<!DOCTYPE html>
<!-- saved from url=(0059)https://blog.csdn.net/qq_52519008/article/details/127169869 -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
    <link rel="canonical" href="https://blog.csdn.net/qq_52519008/article/details/127169869">
    
    <meta name="renderer" content="webkit">
    <meta name="force-rendering" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="report" content="{&quot;spm&quot;:&quot;1001.2101&quot;,&quot;extra&quot;:{&quot;tsab&quot;:&quot;t_3&quot;},&quot;pid&quot;:&quot;blog&quot;}">
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" media="handheld" href="https://blog.csdn.net/qq_52519008/article/details/127169869#">
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
    <meta name="applicable-device" content="pc">
    <link href="https://g.csdnimg.cn/static/logo/favicon32.ico" rel="shortcut icon" type="image/x-icon">
    <title>(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客</title>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(4).txt"></script><script type="text/javascript" async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/auto_dup"></script><script type="text/javascript" charset="utf-8" async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/apiaccept"></script><script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(5).txt" id="google_shimpl"></script><script type="text/javascript" async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/trackad.js.下载"></script><script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/push.js.下载"></script><script type="text/javascript" async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/saved_resource"></script><script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/hm.js.下载"></script><script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/push.js(1).下载" id="ttzz"></script><script>
      (function(){ 
        var el = document.createElement("script"); 
        el.src = "https://s3a.pstatp.com/toutiao/push.js?1abfa13dfe74d72d41d83c86d240de427e7cac50c51ead53b2e79d40c7952a23ed7716d05b4a0f683a653eab3e214672511de2457e74e99286eb2c33f4428830"; 
        el.id = "ttzz"; 
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(el, s);
      })(window)
    </script>
        <meta name="keywords" content="Java基础——网络编程全网超详解！！！！！！！">
    <meta name="description" content="若希望输出数据，例如向服务器端的 CGI （公共网关接口-Common Gateway Interface-的简称，是用户浏览器和服务器端的应用程序进行连接的接口）程序发送一些数据，则必须先与URL建立连接，然后才能对其进行读写，此时需要使用URLConnection。释放连接时，被动方服务器，突然收到主动方客户端释放连接的请求时并不能立即释放连接，因为还有必要的数据需要处理，所以服务器先返回ACK确认收到报文，经过CLOSE-WAIT阶段准备好释放连接之后，才能返回FIN释放连接报文。">
        <link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/detail_enter-95840df9c6.min.css">
    <script type="application/ld+json">{"@context":"https://ziyuan.baidu.com/contexts/cambrian.jsonld","@id":"https://blog.csdn.net/qq_52519008/article/details/127169869","appid":"1638831770136827","pubDate":"2022-10-05T10:18:30","title":"Java基础&mdash;&mdash;网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客","upDate":"2022-10-05T23:53:26"}</script>
        <link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/skin-whitemove-2af9149bdc.min.css">
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/jquery-1.9.1.min.js.下载" type="text/javascript"></script>
    <script type="text/javascript">
        var isCorporate = false;//注释删除enterprise
        var username =  "qq_52519008";
        var skinImg = "white";
        var blog_address = "https://blog.csdn.net/qq_52519008";
        var currentUserName = "u013421039";
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/qq_52519008/article/details/127169869";
        var blogUrl = "https://blog.csdn.net/";
        var avatar = "https://profile-avatar.csdnimg.cn/bb2a03d43ed44186a8a4af512629451c_qq_52519008.jpg!1";
        var articleTitle = "Java基础——网络编程全网超详解！！！！！！！";
        var articleDesc = "若希望输出数据，例如向服务器端的 CGI （公共网关接口-Common Gateway Interface-的简称，是用户浏览器和服务器端的应用程序进行连接的接口）程序发送一些数据，则必须先与URL建立连接，然后才能对其进行读写，此时需要使用URLConnection。释放连接时，被动方服务器，突然收到主动方客户端释放连接的请求时并不能立即释放连接，因为还有必要的数据需要处理，所以服务器先返回ACK确认收到报文，经过CLOSE-WAIT阶段准备好释放连接之后，才能返回FIN释放连接报文。";
        var articleTitles = "Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客";
        var nickName = "酱紫学Java";
        var articleDetailUrl = "https://blog.csdn.net/qq_52519008/article/details/127169869";
        if(window.location.host.split('.').length == 3) {
            blog_address = blogUrl + username;
        }
        var skinStatus = "White";
        var blogStaticHost = "https://csdnimg.cn/release/blogv2/"
        var mallTestStyle = "control"
    </script>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/saved_resource(1)" type="text/javascript"></script>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/report.js.下载" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/ds.js.下载"></script>
<link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-toolbar-default.css"><script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-notification.js.下载"></script><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/collection-box.css"><script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-login.js.下载"></script><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-tooltip.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-medal.css"><script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/html2canvas.min.js.下载"></script><style></style><meta http-equiv="origin-trial" content="A7CQXglZzTrThjGTBEn1rWTxHOEtkWivwzgea+NjyardrwlieSjVuyG44PkYgIPGs8Q9svD8sF3Yedn0BBBjXAkAAACFeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A3vKT9yxRPjmXN3DpIiz58f5JykcWHjUo/W7hvmtjgh9jPpQgem9VbADiNovG8NkO6mRmk70Kex8/KUqAYWVWAEAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A4A26Ymj79UVY7C7JGUS4BG1s7MdcDokAQf/RP0paks+RoTYbXHxceT/5L4iKcsleFCngi75YfNRGW2+SpVv1ggAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="As0hBNJ8h++fNYlkq8cTye2qDLyom8NddByiVytXGGD0YVE+2CEuTCpqXMDxdhOMILKoaiaYifwEvCRlJ/9GcQ8AAAB8eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3MTk1MzI3OTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><meta http-equiv="origin-trial" content="AgRYsXo24ypxC89CJanC+JgEmraCCBebKl8ZmG7Tj5oJNx0cmH0NtNRZs3NB5ubhpbX/bIt7l2zJOSyO64NGmwMAAACCeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3MTk1MzI3OTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><meta http-equiv="origin-trial" content="A7CQXglZzTrThjGTBEn1rWTxHOEtkWivwzgea+NjyardrwlieSjVuyG44PkYgIPGs8Q9svD8sF3Yedn0BBBjXAkAAACFeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A3vKT9yxRPjmXN3DpIiz58f5JykcWHjUo/W7hvmtjgh9jPpQgem9VbADiNovG8NkO6mRmk70Kex8/KUqAYWVWAEAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A4A26Ymj79UVY7C7JGUS4BG1s7MdcDokAQf/RP0paks+RoTYbXHxceT/5L4iKcsleFCngi75YfNRGW2+SpVv1ggAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjk1MTY3OTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="As0hBNJ8h++fNYlkq8cTye2qDLyom8NddByiVytXGGD0YVE+2CEuTCpqXMDxdhOMILKoaiaYifwEvCRlJ/9GcQ8AAAB8eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3MTk1MzI3OTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><meta http-equiv="origin-trial" content="AgRYsXo24ypxC89CJanC+JgEmraCCBebKl8ZmG7Tj5oJNx0cmH0NtNRZs3NB5ubhpbX/bIt7l2zJOSyO64NGmwMAAACCeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiV2ViVmlld1hSZXF1ZXN0ZWRXaXRoRGVwcmVjYXRpb24iLCJleHBpcnkiOjE3MTk1MzI3OTksImlzU3ViZG9tYWluIjp0cnVlfQ=="><style type="text/css">.hljs-ln{border-collapse:collapse}            .hljs-ln td{padding:0}            .hljs-ln-n{text-align: right;padding-right: 8px;}            .hljs-ln-n:before{content:attr(data-line-number)}</style><style type="text/css">pre{position: relative}pre:hover .code-full-screen{display:none !important;}.code-full-screen{display: none !important;position: absolute;right: 4px;top: 3px;width: 24px !important;height: 24px !important;margin: 4px !important;}pre:hover .hljs-button{display: block}.hljs-button{display: none;position: absolute;right: 4px;top: 4px;font-size: 12px;color: #ffffff;background-color: #9999AA;padding: 2px 8px;margin: 8px;border-radius: 4px;cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.05);}.hljs-button:after{content: attr(data-title)}code .hljs-button{margin: 2px 8px;}</style><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-accusation.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-ordertip.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/order-payment.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/side-toolbar.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-footer.css"><link rel="stylesheet" type="text/css" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-login.css"><style>hcfy-result.__hcfy__result__loaded__.__hcfy__result__both__{border: 1px dotted}</style><style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Menu_Button .MathJax_Hover_Arrow {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 4px; -webkit-border-radius: 4px; -moz-border-radius: 4px; -khtml-border-radius: 4px; font-family: 'Courier New',Courier; font-size: 9px; color: #F0F0F0}
.MathJax_Menu_Button .MathJax_Hover_Arrow span {display: block; background-color: #AAA; border: 1px solid; border-radius: 3px; line-height: 0; padding: 4px}
.MathJax_Hover_Arrow:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_Hover_Arrow:hover span {background-color: #CCC!important}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_About.MathJax_MousePost {outline: none}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 2px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 2px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; padding-top: .25em; color: #666666; font-size: .75em}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: 1em}
.MathJax_MenuRadioCheck.RTL {right: 1em; left: auto}
.MathJax_MenuLabel {padding: 2px 2em 4px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #CCCCCC; margin: 4px 1px 0px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: Highlight; color: HighlightText}
.MathJax_MenuDisabled:focus, .MathJax_MenuLabel:focus {background-color: #E8E8E8}
.MathJax_ContextMenu:focus {outline: none}
.MathJax_ContextMenu .MathJax_MenuItem:focus {outline: none}
#MathJax_AboutClose {top: .2em; right: .2em}
.MathJax_Menu .MathJax_MenuClose {top: -10px; left: -10px}
.MathJax_MenuClose {position: absolute; cursor: pointer; display: inline-block; border: 2px solid #AAA; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; font-family: 'Courier New',Courier; font-size: 24px; color: #F0F0F0}
.MathJax_MenuClose span {display: block; background-color: #AAA; border: 1.5px solid; border-radius: 18px; -webkit-border-radius: 18px; -moz-border-radius: 18px; -khtml-border-radius: 18px; line-height: 0; padding: 8px 0 6px}
.MathJax_MenuClose:hover {color: white!important; border: 2px solid #CCC!important}
.MathJax_MenuClose:hover span {background-color: #CCC!important}
.MathJax_MenuClose:hover:focus {outline: none}
</style><style type="text/css">.MathJax_Preview .MJXf-math {color: inherit!important}
</style><style type="text/css">.MJX_Assistive_MathML {position: absolute!important; top: 0; left: 0; clip: rect(1px, 1px, 1px, 1px); padding: 1px 0 0 0!important; border: 0!important; height: 1px!important; width: 1px!important; overflow: hidden!important; display: block!important; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none}
.MJX_Assistive_MathML.MJX_Assistive_MathML_Block {width: 100%!important}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1em; bottom: 1.5em; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><link rel="preload" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(6).txt" as="script"><script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(6).txt"></script><style type="text/css">.MJXp-script {font-size: .8em}
.MJXp-right {-webkit-transform-origin: right; -moz-transform-origin: right; -ms-transform-origin: right; -o-transform-origin: right; transform-origin: right}
.MJXp-bold {font-weight: bold}
.MJXp-italic {font-style: italic}
.MJXp-scr {font-family: MathJax_Script,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-frak {font-family: MathJax_Fraktur,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-sf {font-family: MathJax_SansSerif,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-cal {font-family: MathJax_Caligraphic,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-mono {font-family: MathJax_Typewriter,'Times New Roman',Times,STIXGeneral,serif}
.MJXp-largeop {font-size: 150%}
.MJXp-largeop.MJXp-int {vertical-align: -.2em}
.MJXp-math {display: inline-block; line-height: 1.2; text-indent: 0; font-family: 'Times New Roman',Times,STIXGeneral,serif; white-space: nowrap; border-collapse: collapse}
.MJXp-display {display: block; text-align: center; margin: 1em 0}
.MJXp-math span {display: inline-block}
.MJXp-box {display: block!important; text-align: center}
.MJXp-box:after {content: " "}
.MJXp-rule {display: block!important; margin-top: .1em}
.MJXp-char {display: block!important}
.MJXp-mo {margin: 0 .15em}
.MJXp-mfrac {margin: 0 .125em; vertical-align: .25em}
.MJXp-denom {display: inline-table!important; width: 100%}
.MJXp-denom > * {display: table-row!important}
.MJXp-surd {vertical-align: top}
.MJXp-surd > * {display: block!important}
.MJXp-script-box > *  {display: table!important; height: 50%}
.MJXp-script-box > * > * {display: table-cell!important; vertical-align: top}
.MJXp-script-box > *:last-child > * {vertical-align: bottom}
.MJXp-script-box > * > * > * {display: block!important}
.MJXp-mphantom {visibility: hidden}
.MJXp-munderover {display: inline-table!important}
.MJXp-over {display: inline-block!important; text-align: center}
.MJXp-over > * {display: block!important}
.MJXp-munderover > * {display: table-row!important}
.MJXp-mtable {vertical-align: .25em; margin: 0 .125em}
.MJXp-mtable > * {display: inline-table!important; vertical-align: middle}
.MJXp-mtr {display: table-row!important}
.MJXp-mtd {display: table-cell!important; text-align: center; padding: .5em 0 0 .5em}
.MJXp-mtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-mlabeledtr {display: table-row!important}
.MJXp-mlabeledtr > .MJXp-mtd:first-child {padding-left: 0}
.MJXp-mlabeledtr:first-child > .MJXp-mtd {padding-top: 0}
.MJXp-merror {background-color: #FFFF88; color: #CC0000; border: 1px solid #CC0000; padding: 1px 3px; font-style: normal; font-size: 90%}
.MJXp-scale0 {-webkit-transform: scaleX(.0); -moz-transform: scaleX(.0); -ms-transform: scaleX(.0); -o-transform: scaleX(.0); transform: scaleX(.0)}
.MJXp-scale1 {-webkit-transform: scaleX(.1); -moz-transform: scaleX(.1); -ms-transform: scaleX(.1); -o-transform: scaleX(.1); transform: scaleX(.1)}
.MJXp-scale2 {-webkit-transform: scaleX(.2); -moz-transform: scaleX(.2); -ms-transform: scaleX(.2); -o-transform: scaleX(.2); transform: scaleX(.2)}
.MJXp-scale3 {-webkit-transform: scaleX(.3); -moz-transform: scaleX(.3); -ms-transform: scaleX(.3); -o-transform: scaleX(.3); transform: scaleX(.3)}
.MJXp-scale4 {-webkit-transform: scaleX(.4); -moz-transform: scaleX(.4); -ms-transform: scaleX(.4); -o-transform: scaleX(.4); transform: scaleX(.4)}
.MJXp-scale5 {-webkit-transform: scaleX(.5); -moz-transform: scaleX(.5); -ms-transform: scaleX(.5); -o-transform: scaleX(.5); transform: scaleX(.5)}
.MJXp-scale6 {-webkit-transform: scaleX(.6); -moz-transform: scaleX(.6); -ms-transform: scaleX(.6); -o-transform: scaleX(.6); transform: scaleX(.6)}
.MJXp-scale7 {-webkit-transform: scaleX(.7); -moz-transform: scaleX(.7); -ms-transform: scaleX(.7); -o-transform: scaleX(.7); transform: scaleX(.7)}
.MJXp-scale8 {-webkit-transform: scaleX(.8); -moz-transform: scaleX(.8); -ms-transform: scaleX(.8); -o-transform: scaleX(.8); transform: scaleX(.8)}
.MJXp-scale9 {-webkit-transform: scaleX(.9); -moz-transform: scaleX(.9); -ms-transform: scaleX(.9); -o-transform: scaleX(.9); transform: scaleX(.9)}
.MathJax_PHTML .noError {vertical-align: ; font-size: 90%; text-align: left; color: black; padding: 1px 3px; border: 1px solid}
</style><script async="" src="https://fundingchoicesmessages.google.com/i/ca-pub-1076724771190722?ers=2"></script></head>
  <body class="nodata " style=""><div id="MathJax_Message" style="display: none;"></div><div id="csdn-toolbar" style="position: fixed; min-width: 100%; width: max-content; top: 0px; left: 0px; z-index: 1993;">
                    <div class="toolbar-inside exp3">
                      <div class="toolbar-container">
                        <div class="toolbar-container-left">
                          <div class="toolbar-logo toolbar-subMenu-box csdn-toolbar-fl"><a data-report-click="{&quot;spm&quot;:&quot;3001.4476&quot;}" data-report-query="spm=3001.4476" href="https://www.csdn.net/"><img title="CSDN首页" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20201124032511.png"></a>
                    </div>
                          <ul class="toolbar-menus csdn-toolbar-fl"><li class="active " title="阅读深度、前沿文章">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4477&quot;}" data-report-query="spm=3001.4477" href="https://blog.csdn.net/">
                                  博客
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="高价值源码课程分享">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6907&quot;}" data-report-query="spm=3001.6907" href="https://download.csdn.net/">
                                  下载
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="系统学习·问答·比赛">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.4482&quot;}" data-report-query="spm=3001.4482" href="https://edu.csdn.net/">
                                  学习
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="找到志同道合的伙伴">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://bbs.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.6068&quot;}" data-report-query="spm=3001.6068" href="https://bbs.csdn.net/">
                                  社区
                                  
                                  
                                </a>
                                
                                
                              </li>false<li class="" title="开源代码托管">
                                <a data-report-click="{&quot;mod&quot;:&quot;&quot;,&quot;dest&quot;:&quot;https://gitcode.net?utm_source=csdn_toolbar&quot;,&quot;spm&quot;:&quot;3001.6768&quot;}" data-report-query="spm=3001.6768" href="https://gitcode.net/?utm_source=csdn_toolbar">
                                  GitCode
                                  
                                  
                                </a>
                                
                                
                              </li><li class="" title="让你的灵感的立即落地">
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://inscode.csdn.net/gpu?utm_source=260232576&quot;,&quot;spm&quot;:&quot;3001.8290&quot;}" data-report-query="spm=3001.8290" href="https://inscode.csdn.net/gpu?utm_source=260232576">
                                  InsCode
                                  <img style="vertical-align: middle; width: 34px;margin-top: -3px;" "="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20230607014810.png">
                                  
                                </a>
                                
                                
                              </li></ul>
                        </div>
                        <div class="toolbar-container-middle">
                        <div class="toolbar-search onlySearch"><div class="toolbar-search-container">
                    <span class="icon-fire" style="display: block;"></span>
                    <input id="toolbar-search-input" maxlength="2000" autocomplete="off" type="text" value="" placeholder="网络协议" style="text-indent: 32px;"><div class="gradient"></div>
                    <button id="toolbar-search-button"><i></i><span>搜索</span></button>
                    <input type="password" autocomplete="new-password" readonly="" disabled="true" style="display: none; position:absolute;left:-9999999px;width:0;height:0;">
                  </div></div></div>
                        <div class="toolbar-container-right">
                          <div class="toolbar-btns onlyUser"><div class="toolbar-btn toolbar-btn-login toolbar-btn-login-new csdn-toolbar-fl toolbar-subMenu-box">
          <a class="hasAvatar" data-report-click="{&quot;spm&quot;: &quot;3001.5343&quot;}" data-report-query="spm=3001.5343" href="https://blog.csdn.net/u013421039"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/2_u013421039"></a>
          <div id="csdn-toolbar-profile" class="csdn-toolbar-plugin">
            <div class="csdn-profile-top">
              <a class="csdn-profile-avatar" data-report-click="{&quot;spm&quot;: &quot;3001.5343&quot;}" data-report-query="spm=3001.5343" href="https://blog.csdn.net/u013421039"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/0_u013421039"></a>
              <p class="csdn-profile-nickName">--</p>
              <a data-report-click="{&quot;spm&quot;: &quot;3001.5344&quot;}" data-report-query="spm=3001.5344" href="https://mall.csdn.net/vip" class="csdn-profile-no-vip"></a>
            </div>
            <div class="csdn-profile-mid">
              <a data-report-click="{&quot;spm&quot;: &quot;3001.5347&quot;}" data-report-query="spm=3001.5347" href="https://blog.csdn.net/u013421039?type=sub&amp;subType=fans"><i class="csdn-profile-fansCount">--</i>粉丝</a>
              <a data-report-click="{&quot;spm&quot;: &quot;3001.5348&quot;}" data-report-query="spm=3001.5348" href="https://blog.csdn.net/u013421039?type=sub"><i class="csdn-profile-followCount">--</i>关注</a>
              <a data-report-click="{&quot;spm&quot;: &quot;3001.5349&quot;}" data-report-query="spm=3001.5349" href="https://blog.csdn.net/u013421039"><i class="csdn-profile-likeCount">--</i>获赞</a>
            </div>
            <div class="csdn-profile-bottom">
              <ul class="csdn-border-bottom">
                <li class=""><a href="https://i.csdn.net/#/user-center/profile" data-report-click="{&quot;dest&quot;:&quot;https://i.csdn.net/#/user-center/profile&quot;,&quot;spm&quot;:&quot;3001.5111&quot;}" data-report-query="spm=3001.5111"><i class="csdn-profile-icon csdn-profile-icon-person"></i>个人中心</a></li><li class=""><a href="https://mp.csdn.net/mp_blog/manage/article?spm=1011.2124.3001.5298" data-report-click="{&quot;dest&quot;:&quot;https://mp.csdn.net/mp_blog/manage/article?spm=1011.2124.3001.5298&quot;,&quot;spm&quot;:&quot;3001.5448&quot;}" data-report-query="spm=3001.5448"><i class="csdn-profile-icon csdn-profile-icon-pages"></i>内容管理</a></li><li class=""><a href="https://edu.csdn.net/?utm_source=edu_txxl_mh" data-report-click="{&quot;dest&quot;:&quot;https://edu.csdn.net?utm_source=edu_txxl_mh&quot;,&quot;spm&quot;:&quot;3001.5350&quot;}" data-report-query="spm=3001.5350"><i class="csdn-profile-icon csdn-profile-icon-study"></i>我的学习</a></li><li class=""><a href="https://mall.csdn.net/myorder" data-report-click="{&quot;dest&quot;:&quot;https://mall.csdn.net/myorder&quot;,&quot;spm&quot;:&quot;3001.5137&quot;}" data-report-query="spm=3001.5137"><i class="csdn-profile-icon csdn-profile-icon-order"></i>我的订单</a></li><li class=""><a href="https://i.csdn.net/#/wallet/index" data-report-click="{&quot;dest&quot;:&quot;https://i.csdn.net/#/wallet/index&quot;,&quot;spm&quot;:&quot;3001.5136&quot;}" data-report-query="spm=3001.5136"><i class="csdn-profile-icon csdn-profile-icon-wallet"></i>我的钱包</a></li><li class=""><a href="https://dev-portal.csdn.net/welcome?utm_source=toolbar_user_profile" data-report-click="{&quot;dest&quot;:&quot;https://dev-portal.csdn.net/welcome?utm_source=toolbar_user_profile&quot;,&quot;spm&quot;:&quot;3001.7345&quot;}" data-report-query="spm=3001.7345"><i class="csdn-profile-icon csdn-profile-icon-API"></i>我的云服务</a></li><li class="pb-8 csdn-border-bottom"><a href="https://ac.csdn.net/user/myCert.html" data-report-click="{&quot;dest&quot;:&quot;https://ac.csdn.net/user/myCert.html&quot;,&quot;spm&quot;:&quot;3001.7346&quot;}" data-report-query="spm=3001.7346"><i class="csdn-profile-icon csdn-profile-icon-ac"></i>我的认证</a></li><li class="pt-8 pb-8 csdn-border-bottom"><a href="https://i.csdn.net/#/uc/reward" data-report-click="{&quot;dest&quot;:&quot;https://i.csdn.net/#/uc/reward&quot;,&quot;spm&quot;:&quot;3001.5351&quot;}" data-report-query="spm=3001.5351"><i class="csdn-profile-icon csdn-profile-icon-draw"></i>签到抽奖</a></li><li class="pt-8 csdn-profile-logout"><a href="javascript:;" data-report-click="{&quot;spm&quot;:&quot;3001.5139&quot;}" data-report-query="spm=3001.5139"><i class="csdn-profile-icon csdn-profile-icon-logout"></i>退出</a></li>
              </ul>
            </div>
          </div></div>
          <div class="toolbar-btn toolbar-btn-vip csdn-toolbar-fl">
            <a data-report-click="{&quot;mod&quot;:&quot;popu_336&quot;,&quot;dest&quot;:&quot;https://mall.csdn.net/vip&quot;,&quot;spm&quot;:&quot;3001.4496&quot;}" data-report-query="spm=3001.4496" href="https://mall.csdn.net/vip">
              会员中心 <img style="position: relative; vertical-align: middle; width: 14px; top: -2px; left: 0px;;display:inline-block" "="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20210918025138.gif">
            </a>
          </div>
          <div class="toolbar-btn toolbar-btn-msg csdn-toolbar-fl">
              <div class="toolbar-subMenu-box">
                <a data-report-click="{&quot;spm&quot;:&quot;3001.4508&quot;}" data-report-query="spm=3001.4508" id="toolbar-remind" href="https://i.csdn.net/#/msg/index"><span class="pos-rel">消息<i class="toolbar-msg-count"></i></span></a>
              <div class="toolbar-subMenu">
                          <a data-type="comment" href="https://i.csdn.net/#/msg/index"><span class="pos-rel">评论和@<i></i></span></a>
                          <a data-type="attention" href="https://i.csdn.net/#/msg/attention"><span class="pos-rel">新增粉丝<i></i></span></a>         
                          <a data-type="like" href="https://i.csdn.net/#/msg/like"><span class="pos-rel">赞和收藏<i></i></span></a>
                          <a data-type="chat" href="https://im.csdn.net/im/main.html"><span class="pos-rel">私信<i></i></span></a>
                          <a data-type="notice" href="https://i.csdn.net/#/msg/notice"><span class="pos-rel">系统通知<i></i></span></a>
                          <a href="https://i.csdn.net/#/msg/setting">消息设置</a>
                     </div></div>
              <div class="toolbar-msg-box"></div>
            </div>
          <div class="toolbar-btn toolbar-btn-collect csdn-toolbar-fl">
            <a data-report-click="{&quot;spm&quot;:&quot;3001.7480&quot;}" data-report-query="spm=3001.7480" href="https://i.csdn.net/#/user-center/history">历史</a>
          </div>
          <div class="toolbar-btn toolbar-btn-mp csdn-toolbar-fl">
            <a title="创作中心" data-report-click="{&quot;dest&quot;:&quot;https://mp.csdn.net/&quot;,&quot;spm&quot;:&quot;3001.8539&quot;}" data-report-query="spm=3001.8539" href="https://mp.csdn.net/">
              创作中心
            </a>
          </div>
          <div class="toolbar-btn toolbar-btn-write toolbar-btn-write-new csdn-toolbar-fl toolbar-subMenu-box"><a class="has-img" data-report-click="{&quot;spm&quot;:&quot;3001.7765&quot;}" data-report-query="spm=3001.7765" href="https://mp.csdn.net/edit">
                      <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20230406105129.png">
                    </a></div>
        </div>
                        </div>
                      </div>
                    </div>
                  </div>
        <script>
            var toolbarSearchExt = '{"landingWord":[],"queryWord":"","tag":["网络","java","网络协议","网络编程"],"title":"Java基础&mdash;&mdash;网络编程全网超详解！！！！！！！"}';
        </script>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-toolbar.js.下载" type="text/javascript"></script>
    <script>
    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
    </script>

    <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/blog_code-01256533b5.min.css">
    <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/chart-3456820cac.css">
    <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/swiper.css">
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/swiper.js.下载" async=""></script>
    <script>
      var articleId = 127169869;
      var commentscount = 0;
      var curentUrl = "https://blog.csdn.net/qq_52519008/article/details/127169869";
      var myUrl = "https://my.csdn.net/";
        var highlight = ["java","网络编程","网络协议","全网","网络","详解","基础","超"];//高亮数组
        var isRecommendModule = true;
          var isBaiduPre = true;
          var baiduCount = 2;
          var setBaiduJsCount = 10;
      var share_card_url = "https://app-blog.csdn.net/share?article_id=127169869&username=qq_52519008"
      var articleType = 1;
      var baiduKey = "";
      var userNewReport = true;
      var copyPopSwitch = true;
      var needInsertBaidu = true;
      var recommendRegularDomainArr = ["blog.csdn.net/.+/article/details/","download.csdn.net/download/","edu.csdn.net/course/detail/","ask.csdn.net/questions/","bbs.csdn.net/topics/","www.csdn.net/gather_.+/"]
      var codeStyle = "";
      var baiduSearchType = "";
      var sharData = "{\"hot\":[{\"id\":1,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a5f4260710904e538002a6ab337939b3.png\"},{\"id\":2,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/188b37199a2c4b74b1d9ffc39e0d52de.png\"},{\"id\":3,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/14ded358b631444581edd98a256bc5af.png\"},{\"id\":4,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1470f23a770444d986ad551b9c33c5be.png\"},{\"id\":5,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c329f5181dc74f6c9bd28c982bb9f91d.png\"},{\"id\":6,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ccd8a3305e81460f9c505c95b432a65f.png\"},{\"id\":7,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/bc89d8283389440d97fc4d30e30f45e1.png\"},{\"id\":8,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/452d485b4a654f5592390550d2445edf.png\"},{\"id\":9,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f8b9939db2ed474a8f43a643015fc8b7.png\"},{\"id\":10,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/6de8864187ab4ed3b1db0856369c36ff.png\"},{\"id\":11,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/673cc3470ff74072acba958dc0c46e2d.png\"},{\"id\":12,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/930c119760ac4491804db80f9c6d4e3f.png\"},{\"id\":13,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/15e6befb05a24233bc2b65e96aa8d972.png\"},{\"id\":14,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2075fd6822184b95a41e214de4daec13.png\"},{\"id\":15,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/859b1552db244eb6891a809263a5c657.png\"},{\"id\":16,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/0be2f920f1f74290a98921974a9613fd.png\"},{\"id\":17,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2e97e00b43f14afab494ea55ef3f4a6e.png\"},{\"id\":18,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ff4ab252f46e444686f5135d6ebbfec0.png\"},{\"id\":19,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/ae029bbe99564e79911657912d36524f.png\"},{\"id\":20,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b3ece39963de440388728e9e7b9bf427.png\"},{\"id\":21,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/6f14651a99ba486e926d63b6fa692997.png\"},{\"id\":22,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/83ceddf050084875a341e32dcceca721.png\"},{\"id\":23,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b90368b8fd5d4c6c8c79a707d877cf7c.png\"},{\"id\":24,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/aeffae14ecf14e079b2616528c9a393b.png\"},{\"id\":25,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c5a06b5a13d44d16bed868fc3384897a.png\"},{\"id\":26,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/08b697658b844b318cea3b119e9541ef.png\"},{\"id\":27,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/68ccb0b8d09346ac961d2b5c1a8c77bf.png\"},{\"id\":28,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a2227a247e37418cbe0ea972ba6a859b.png\"},{\"id\":29,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/3a42825fede748f9993e5bb844ad350d.png\"},{\"id\":30,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/8882abc1dd484224b636966ea38555c3.png\"},{\"id\":31,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/4f6a5f636a3e444d83cf8cc06d87a159.png\"},{\"id\":32,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1953ef79c56b4407b78d7181bdff11c3.png\"},{\"id\":33,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c04a2a4f772948ed85b5b0380ed36287.png\"},{\"id\":34,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/5b4fecd05091405ea04d8c0f53e9f2c7.png\"},{\"id\":35,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b89f576d700344e280d6ceb2a66c2420.png\"},{\"id\":36,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/1c65780e11804bbd9971ebadb3d78bcf.png\"},{\"id\":37,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/d590db2055f345db9706eb68a7ec151a.png\"},{\"id\":38,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/fe602f80700b4f6fb3c4a9e4c135510e.png\"},{\"id\":39,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/39ff2fcd31e04feba301a071976a0ba7.png\"},{\"id\":40,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f9b61b3d113f436b828631837f89fb39.png\"},{\"id\":41,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/df1aca5f610c4ad48cd16da88c9c8499.png\"},{\"id\":42,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/d7acf73a1e6b41399a77a85040e10961.png\"},{\"id\":43,\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/b7f1b63542524b97962ff649ab4e7e23.png\"}],\"vip\":[{\"id\":1,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101150.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101154.png\"},{\"id\":2,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101204.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101208.png\"},{\"id\":3,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101211.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101215.png\"},{\"id\":4,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101218.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101220.png\"},{\"id\":5,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101223.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220920101226.png\"},{\"id\":6,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100635.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100639.png\"},{\"id\":7,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100642.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100644.png\"},{\"id\":8,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100647.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100649.png\"},{\"id\":9,\"vipUrl\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100652.png\",\"url\":\"https:\\/\\/img-home.csdnimg.cn\\/images\\/20220922100655.png\"},{\"id\":10,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/55de67481fde4b04b97ad78f11fe369a.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/bb2418fb537e4d78b10d8765ccd810c5.png\"},{\"id\":11,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/579c713394584d128104ef1044023954.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/f420d9fbcf5548079d31b5e809b6d6cd.png\"},{\"id\":12,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/75b7f3155ba642f5a4cc16b7baf44122.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a9030f5877be401f8b340b80b0d91e64.png\"},{\"id\":13,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/0903d33cafa54934be3780aa54ae958d.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/2cd8c8929f5a42fca5da2a0aeb456203.png\"},{\"id\":14,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/949fd7c22884439fbfc3c0e9c3b8dee7.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/dafbea9bd9eb4f3b962b48dc41657f89.png\"},{\"id\":15,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/4119cfddd71d4e6a8a27a18dbb74d90e.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/c56310c8b6384d9e85388e4e342ce508.png\"},{\"id\":16,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/121575274da142bcbbbbc2e8243dd411.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/5013993de06542f881018bb9abe2edf7.png\"},{\"id\":17,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/4d97aa6dd4fe4f09a6bef5bdf8a6abcd.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/76f23877b6ad4066ad45ce8e31b4b977.png\"},{\"id\":18,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/fdb619daf21b4c829de63b9ebc78859d.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/a1abe5d27a5441f599adfe662f510243.png\"},{\"id\":19,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/676b7707bb11410f8f56bc0ed2b2345c.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/7ac5b467fbf24e1d8c2de3f3332c4f54.png\"},{\"id\":20,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/0becb8cc227e4723b765bdd69a20fd4a.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/fdec85b26091486b9a89d0b8d45c3749.png\"},{\"id\":21,\"vipUrl\":\"https:\\/\\/img-blog.csdnimg.cn\\/1a6c06235ad44941b38c54cbc25a370c.png\",\"url\":\"https:\\/\\/img-blog.csdnimg.cn\\/410a06cda2d44b0c84578f88275caf70.png\"}],\"map\":{\"hot\":\"热门\",\"vip\":\"VIP\"}}";
      
      var canRead = true;
      var blogMoveHomeArticle = false;
      var showPcWindowAd = false;
      var showHeadWord = true;
      var showSearchText = "";
      var linkPage = true;
      var articleSource = 1;
      var articleReport = '{"spm":"1001.2101","extra":{"tsab":"t_3"},"pid":"blog"}';
      var isShowToQuestion = false;
        var baiduSearchChannel = 'pc_relevant'
        var baiduSearchIdentification = '.235^v38^pc_relevant_anti_t3'
        var distRequestId = '1686562737647_56793'
        var initRewardObject = {
          giver: currentUserName,
          anchor: username,
          articleId: articleId,
          sign: ''
        }
        var isLikeStatus = false;
        var isUnLikeStatus = false;
        var studyLearnWord = "";
        var isCurrentUserVip = false;
        var contentViewsHeight = 0;
        var contentViewsCount = 0;
        var contentViewsCountLimit = 5;
        var isShowConcision = true
      var isCookieConcision = false
      var isHasDirectoryModel = false
      var isShowSideModel = false
      var isShowDirectoryModel = true
      function getCookieConcision(sName){
        var allCookie = document.cookie.split("; ");
        for (var i=0; i < allCookie.length; i++){
          var aCrumb = allCookie[i].split("=");
          if (sName == aCrumb[0])
            return aCrumb[1];
        }
        return null;
      }
      if (getCookieConcision('blog_details_concision') && getCookieConcision('blog_details_concision') == 0){
        isCookieConcision = true
        isShowSideModel = true
        isShowDirectoryModel = false
      }
    </script>
        <div class="main_father clearfix d-flex justify-content-center" style="height: auto !important;">
          <div class="container clearfix" id="mainBox">
          <script>
          if (!isCookieConcision) {
            $('.main_father').removeClass('mainfather-concision')
            $('.main_father .container').removeClass('container-concision')
          }
          </script>
          <main>
<script type="text/javascript">
    var resourceId =  "";
    function getQueryString(name) {   
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象  
      var r = window.location.search.substr(1).match(reg);  //匹配目标参数
      if( r != null ) return decodeURIComponent( r[2] ); return '';   
    }
    function stripscript(s){ 
      var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%]") 
      var rs = ""; 
      for (var i = 0; i < s.length; i++) { 
        rs = rs+s.substr(i, 1).replace(pattern, ''); 
      } 
      return rs;
    }
    var blogHotWords = stripscript(getQueryString('utm_term')).length > 1 ? stripscript(getQueryString('utm_term')) : ''
</script>
<div class="blog-content-box">
    <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <h1 class="title-article" id="articleContentId">Java基础——网络编程全网超详解！！！！！！！</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                    <img class="article-type-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/original.png" alt="">
                    <div class="bar-content">
                      <a class="follow-nickName " href="https://blog.csdn.net/qq_52519008" target="_blank" rel="noopener" title="酱紫学Java">酱紫学Java</a>
                    <img class="article-time-img article-heard-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCurrentTime2.png" alt="">
                        <span class="time">于&nbsp;2022-10-05 23:53:26&nbsp;发布</span>
                    <img class="article-read-img article-heard-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/articleReadEyes2.png" alt="">
                    <span class="read-count">694</span>
                    <a id="blog_detail_zk_collection" class="un-collection" data-report-click="{&quot;mod&quot;:&quot;popu_823&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4232&quot;,&quot;ab&quot;:&quot;new&quot;}">
                        <img class="article-collect-img article-heard-img un-collect-status isdefault" style="display:inline-block" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/tobarCollect2.png" alt="">
                        <img class="article-collect-img article-heard-img collect-status isactive" style="display:none" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/tobarCollectionActive2.png" alt="">
                        <span class="name">收藏</span>
                        <span class="get-collection" style="color: rgb(153, 154, 170);">
                            9
                        </span>
                    </a>
                    </div>
                </div>
                <div class="blog-tags-box">
                    <div class="tags-box artic-tag-box">
                            <span class="label">分类专栏：</span>
                                <a class="tag-link" href="https://blog.csdn.net/qq_52519008/category_12042889.html" target="_blank" rel="noopener">Java基础入门</a>
                            <span class="label">文章标签：</span>
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_626&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4223&quot;,&quot;strategy&quot;:&quot;网络&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;网络\&quot;}&quot;}" class="tag-link" href="https://so.csdn.net/so/search/s.do?q=%E7%BD%91%E7%BB%9C&amp;t=all&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">网络</a>
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_626&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4223&quot;,&quot;strategy&quot;:&quot;java&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;java\&quot;}&quot;}" class="tag-link" href="https://so.csdn.net/so/search/s.do?q=java&amp;t=all&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">java</a>
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_626&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4223&quot;,&quot;strategy&quot;:&quot;网络协议&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;网络协议\&quot;}&quot;}" class="tag-link" href="https://so.csdn.net/so/search/s.do?q=%E7%BD%91%E7%BB%9C%E5%8D%8F%E8%AE%AE&amp;t=all&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">网络协议</a>
                                <a data-report-click="{&quot;mod&quot;:&quot;popu_626&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4223&quot;,&quot;strategy&quot;:&quot;网络编程&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;网络编程\&quot;}&quot;}" class="tag-link" href="https://so.csdn.net/so/search/s.do?q=%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B&amp;t=all&amp;o=vip&amp;s=&amp;l=&amp;f=&amp;viparticle=" target="_blank" rel="noopener">网络编程</a>
                    </div>
                </div>
                <div class="slide-content-box">
                    <div class="article-copyright">
                        <div class="creativecommons">
                            版权声明：本文为博主原创文章，遵循<a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" rel="noopener"> CC 4.0 BY-SA </a>版权协议，转载请附上原文出处链接和本声明。
                        </div>
                        <div class="article-source-link">
                            本文链接：<a href="https://blog.csdn.net/qq_52519008/article/details/127169869" target="_blank">https://blog.csdn.net/qq_52519008/article/details/127169869</a>
                        </div>
                    </div>
                </div>
                
                <div class="operating">
                    <a class="href-article-edit slide-toggle">版权</a>
                </div>
            </div>
        </div>
    </div>
    
        <div id="blogColumnPayAdvert">
            <div class="column-group">
                <div class="column-group-item column-group0 column-group-item-one">
                    <div class="item-l">
                        <a class="item-target" href="https://blog.csdn.net/qq_52519008/category_12042889.html" target="_blank" title="Java基础入门" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6332&quot;}">
                            <img class="item-target" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20201014180756928.png" alt="">
                            <span class="title item-target">
                                <span>
                                <span class="tit">Java基础入门</span>
                                    <span class="dec">专栏收录该内容</span>
                                </span>
                            </span>
                        </a>
                    </div>
                    <div class="item-m">
                        <span>22 篇文章</span>
                        <span>8 订阅</span>
                    </div>
                    <div class="item-r">
                            <a class="item-target article-column-bt articleColumnFreeBt" data-id="12042889">订阅专栏</a>
                    </div>
                </div>
            </div>
        </div>
    <article class="baidu_pl">
        <div id="article_content" class="article_content clearfix">
        <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/kdoc_html_views-1a98987dfd.css">
        <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/ck_htmledit_views-25cebea3f9.css">
                <div id="content_views" class="markdown_views prism-atom-one-dark">
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                    <p></p> 
<div class="toc"> 
 <h3><a name="t0"></a>文章目录</h3> 
 <ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_1" target="_self">一、网络编程基本概念</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#1_2" target="_self">1、网络</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#2_6" target="_self">2、计算机网络</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#3_10" target="_self">3、通信协议</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#4_14" target="_self">4、通信接口</a></li></ul> 
  </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_24" target="_self">二、网络分层</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_32" target="_self">三、网络编程三要素</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#1IPInetAddress_33" target="_self">1、IP地址：InetAddress</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#2_45" target="_self">2、端口</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#3_61" target="_self">3、协议</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#31_62" target="_self">3.1、网络通信协议</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#32TCPIP_76" target="_self">3.2、TCP/IP协议簇</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#33TCP__UDP_87" target="_self">3.3、TCP 和 UDP</a></li></ul> 
  </li></ul> 
  </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_TCP_162" target="_self">四. TCP通信程序</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#1TCP_163" target="_self">1、TCP通信原理</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#2TCP_205" target="_self">2、TCP发送数据</a></li></ul> 
  </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_UDP_458" target="_self">五. UDP通信程序</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#1_UDP_459" target="_self">1、 UDP通信原理</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#2PacketDatagramSocket_510" target="_self">2、三个概念：数据包(Packet)、数据报(Datagram)和套接字(Socket)</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#21Datagram_512" target="_self">2.1、数据报(Datagram)</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#22Socket_520" target="_self">2.2、套接字(Socket)</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#23Packet_526" target="_self">2.3、数据包(Packet)</a></li></ul> 
   </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#3_UDP_529" target="_self">3、 UDP发送数据</a></li></ul> 
  </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#URL_755" target="_self">六、URL编程</a></li><li><ul><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#1URL_756" target="_self">1、URL类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#2HTTPURLConnection_785" target="_self">2、针对HTTP协议的URLConnection类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#3URL_797" target="_self">3、URL下载网络资源</a></li></ul> 
  </li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#_841" target="_self">七、小结</a></li></ul> 
</div> 
<p></p> 
<h1><a name="t1"></a><a id="_1"></a>一、<a href="https://so.csdn.net/so/search?q=%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;网络编程\&quot;}&quot;}" data-tit="网络编程" data-pretit="网络编程">网络编程</a>基本概念</h1> 
<h2><a name="t2"></a><a id="1_2"></a>1、网络</h2> 
<p>==将不同区域的电脑连接到一起，组成局域网、城域网或广域网。==把分布在不同地理区域的计算机与专门的外部设备用通信线路互联成一个规模大、功能强的网络系统，从而使众多的计算机可以方便地互相传递信息，<mark>共享硬件、软件、数据信息等资源</mark></p> 
<h2><a name="t3"></a><a id="2_6"></a>2、<a href="https://so.csdn.net/so/search?q=%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%BD%91%E7%BB%9C&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;计算机网络\&quot;}&quot;}" data-tit="计算机网络" data-pretit="计算机网络">计算机网络</a></h2> 
<p>是指将<mark>地理位置相同的具有独立功能的多台计算机及其外部设备</mark>，通过通信线路连接起来，在==网络操作系统、网络管理软件及<a href="https://so.csdn.net/so/search?q=%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE&amp;spm=1001.2101.3001.7020" target="_blank" class="hl hl-1" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https://so.csdn.net/so/search?q=%E9%80%9A%E4%BF%A1%E5%8D%8F%E8%AE%AE&amp;spm=1001.2101.3001.7020&quot;,&quot;extra&quot;:&quot;{\&quot;searchword\&quot;:\&quot;通信协议\&quot;}&quot;}" data-tit="通信协议" data-pretit="通信协议">通信协议</a>的管理和协调下，实现资源共享和信息传递的计算机系统</p> 
<h2><a name="t4"></a><a id="3_10"></a>3、通信协议</h2> 
<p>计算机网络中实现通信必须有一些约定即<mark>通信协议</mark>，对速率、传输代码、代码结构、传输控制步骤、出错控制等制定标准</p> 
<h2><a name="t5"></a><a id="4_14"></a>4、通信接口</h2> 
<p>为了使两个结点之间能进行对话，必须在它们之间<mark>建立通信工具(即接口)</mark>，使彼此之间能进行信息交换</p> 
<p>接口包括<mark>两部分</mark>：</p> 
<ul><li><mark>硬件装置：实现节点之间的信息传送</mark></li><li><mark>软件装置：规定双方进行通信的约定协议</mark></li></ul> 
<hr> 
<h1><a name="t6"></a><a id="_24"></a>二、网络分层</h1> 
<p>由于结点之间联系很复杂，在指定协议时，把复杂成份分解成一些简单的成份，再将他们复合起来。最常用的复合方式是层次方式，即同层间可以通信、上一层可以调用下一层，而与再下一层不发生关系</p> 
<p><mark>TCP/IP是一个协议族，也是按照层次划分，共四层：应用层，传输层，网络层、数据链路层</mark></p> 
<p>OSI网络通信协议模型，是一个参考模型，而TCP/IP协议是事实上的标准。TCP/IP协议参考了OSI模型，但是并没有严格按照OSI规定的七层标准去划分，而只划分了四层，这样会更简单点，当划分太多层时，你很难区分某个协议是属于哪个层次的<br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/b9fe5e305a524896a4124178f8161ec7.png" alt="在这里插入图片描述"></p> 
<h1><a name="t7"></a><a id="_32"></a>三、网络编程三要素</h1> 
<h2><a name="t8"></a><a id="1IPInetAddress_33"></a>1、IP地址：InetAddress</h2> 
<p>要想让网络中的计算机能够互相通信，必须为计算机指定一个<mark>标识号</mark>，通过这个标识号来指定要接受数据的计算机和识别发送的计算机，而<mark>IP地址</mark>就是这个标识号，也就是设备的标识。</p> 
<ul><li>唯一的标识 Internet 上的计算机（通信实体）</li><li><mark>本地回环地址(hostAddress)</mark>：127.0.0.1 <mark>主机名(hostName)</mark>：localhost</li><li><mark>IP地址分类方式1：IPV4 和 IPV6</mark> 
  <ul><li><mark>IPV4</mark>：4个字节组成，4个0-255。大概42亿，30亿都在北美，亚洲4亿。2011年初已经用尽。以点分十进制表示，如192.168.0.1</li><li><mark>IPV6</mark>：128位（16个字节），写成8个无符号整数，每个整数用四个十六进制位表示，数之间用冒号（：）分开，如：3ffe:3201:1401:1280:c8ff:fe4d:db39:1984<br> IP地址分类方式2：公网地址(万维网使用)和私有地址(局域网使用)。192.168.开头的就是私有址址，范围即为192.168.0.0–192.168.255.255，专门为组织机构内部使用<br> 特点：不易记忆</li></ul> </li></ul> 
<h2><a name="t9"></a><a id="2_45"></a>2、端口</h2> 
<p>网络的通信，<mark>本质上是两个应用程序的通信</mark>。每台计算机都有很多的应用程序，那么在网络通信时，如何区别这些应用程序呢？如果说IP地址可以唯一的标识网络中的设备，那么端口号就可以唯一标识设备中的应用程序，也就是应用程序的标识。<br> 端口号标识正在计算机上运行的进程（程序）</p> 
<p><mark>不同的进程有不同的端口号</mark></p> 
<p><mark>被规定为一个 16 位的整数 0~65535。</mark></p> 
<p><strong>端口分类：</strong></p> 
<ul><li><mark>公认端口</mark>：0~1023。被预先定义的服务通信占用（如：HTTP占用端口80，FTP占用端口21，Telnet占用端口23）</li><li><mark>注册端口</mark>：1024~49151。分配给用户进程或应用程序。（如：Tomcat占用端口8080，MySQL占用端口3306，Oracle占用端口1521等）。<br> 动态/私有端口：49152~65535。<br> <mark>端口号与IP地址的组合得出一个网络套接字：Socket。</mark></li></ul> 
<h2><a name="t10"></a><a id="3_61"></a>3、协议</h2> 
<h3><a name="t11"></a><a id="31_62"></a>3.1、网络通信协议</h3> 
<p>通过计算机网络可以使多台计算机实现连接，位于同一网络中的计算机进行连接和通信时需要遵守一定的规则，这就好比在道路中行驶的汽车一定要遵守交通规则一样。在计算机网络中，这些连接和通信的规则被称为计算机网络通信协议。<mark><strong>它对数据的传输格式、传输速率、传输步骤等做了统一规定，通信双方必须同时遵守才能完成数据交换。</strong></mark></p> 
<p><strong>问题：网络协议太复杂</strong></p> 
<p>计算机网络通信涉及内容很多，比如指定源地址和目标地址，加密解密，压缩<br> 解压缩，差错控制，流量控制，路由控制，如何实现如此复杂的网络协议呢？</p> 
<p><strong>通信协议分层的思想</strong></p> 
<p>在制定协议时，把复杂成份分解成一些简单的成份，再将它们复合起来。最常<br> 用的复合方式是层次方式，<strong>即同层间可以通信、上一层可以调用下一层，而与<br> 再下一层不发生关系</strong>。各层互不影响，利于系统的开发和扩展。</p> 
<h3><a name="t12"></a><a id="32TCPIP_76"></a>3.2、TCP/IP协议簇</h3> 
<p>传输层协议中有两个非常重要的协议：</p> 
<p><mark><strong>传输控制协议TCP(Transmission Control Protocol)</strong></mark><br> <strong><mark>用户数据报协议UDP(User Datagram Protocol)</mark></strong></p> 
<p>TCP/IP 以其两个主要协议：==传输控制协议(TCP)<mark>和</mark>网络互联协议(IP) ==而得名，实际上是一组协议，包括多个具有不同功能且互为关联的协议。</p> 
<p>IP(Internet Protocol)协议是网络层的主要协议，支持网间互连的数据通信。</p> 
<p>TCP/IP协议模型从更实用的角度出发，形成了高效的四层体系结构，即<strong>物理链路层、IP层、传输层和应用层。</strong></p> 
<h3><a name="t13"></a><a id="33TCP__UDP_87"></a>3.3、TCP 和 UDP</h3> 
<p><strong>TCP协议：</strong></p> 
<ul><li>使用TCP协议前，须先建立TCP连接，形成传输数据通道</li><li>传输前，采用“三次握手”方式，点对点通信，是可靠的</li><li>TCP协议进行通信的两个应用进程：客户端、服务端</li><li>在连接中可进行大数据量的传输</li><li>传输完毕，需释放已建立的连接，效率低</li></ul> 
<p><strong>UDP协议：</strong></p> 
<ul><li>将数据、源、目的封装成数据包，不需要建立连接</li><li>每个数据报的大小限制在64K内</li><li>发送不管对方是否准备好，接收方收到也不确认，故是不可靠的</li><li>可以广播发送</li><li>发送数据结束时无需释放资源，开销小，速度快</li></ul> 
<p><mark><strong>TCP三次握手</strong></mark><br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/79a8101b2a6c46999cee58491f4ce440.png" alt="在这里插入图片描述"><br> 举个栗子：把客户端比作男孩，服务器比作女孩。用他们的交往来说明“三次握手”过程：</p> 
<p>（1）男孩喜欢女孩，于是写了一封信告诉女孩：我爱你，请和我交往吧！;写完信之后，男孩焦急地等待，因为不知道信能否顺利传达给女孩。</p> 
<p>（2）女孩收到男孩的情书后，心花怒放，原来我们是两情相悦呀！于是给男孩写了一封回信：我收到你的情书了，也明白了你的心意，其实，我也喜欢你！我愿意和你交往！;</p> 
<p>写完信之后，女孩也焦急地等待，因为不知道回信能否能顺利传达给男孩。</p> 
<p>（3）男孩收到回信之后很开心，因为发出的情书女孩收到了，并且从回信中知道了女孩喜欢自己，并且愿意和自己交往。然后男孩又写了一封信告诉女孩：你的心意和信我都收到了，谢谢你，还有我爱你！</p> 
<p>女孩收到男孩的回信之后，也很开心，因为发出的情书男孩收到了。由此男孩女孩双方都知道了彼此的心意，之后就快乐地交流起来了</p> 
<p>这就是通俗版的“三次握手”，期间一共往来了三封信也就是“三次握手”，以此确认两个方向上的数据传输通道是否正常。</p> 
<p><mark><strong>为什么要进行第三次握手？</strong></mark></p> 
<p>为了防止服务器端开启一些无用的连接增加服务器开销以及防止已失效的连接请求报文段突然又传送到了服务端，因而产生错误。</p> 
<p>由于网络传输是有延时的(要通过网络光纤和各种中间代理服务器)，在传输的过程中，比如客户端发起了SYN=1创建连接的请求(第一次握手)。</p> 
<p>如果服务器端就直接创建了这个连接并返回包含SYN、ACK和Seq等内容的数据包给客户端，这个数据包因为网络传输的原因丢失了，丢失之后客户端就一直没有接收到服务器返回的数据包。</p> 
<p>客户端可能设置了一个超时时间，时间到了就关闭了连接创建的请求。再重新发出创建连接的请求，而服务器端是不知道的，如果没有第三次握手告诉服务器端客户端收的到服务器端传输的数据的话，</p> 
<p>服务器端是不知道客户端有没有接收到服务器端返回的信息的。</p> 
<p><mark><strong>TCP四次挥手：</strong></mark><br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/9d06e92e2228471aaf0c06a58a5ead62.png" alt="在这里插入图片描述"><br> 举个栗子：把客户端比作男孩，服务器比作女孩。通过他们的分手来说明“四次挥手”过程。</p> 
<p>“第一次挥手”：日久见人心，男孩发现女孩变成了自己讨厌的样子，忍无可忍，于是决定分手，随即写了一封信告诉女孩。</p> 
<p>“第二次挥手”：女孩收到信之后，知道了男孩要和自己分手，怒火中烧，心中暗骂：你算什么东西，当初你可不是这个样子的！于是立马给男孩写了一封回信：分手就分手，给我点时间，我要把你的东西整理好，全部还给你！男孩收到女孩的第一封信之后，明白了女孩知道自己要和她分手。随后等待女孩把自己的东西收拾好。</p> 
<p>“第三次挥手”：过了几天，女孩把男孩送的东西都整理好了，于是再次写信给男孩：你的东西我整理好了，快把它们拿走，从此你我恩断义绝！</p> 
<p>“第四次挥手”：男孩收到女孩第二封信之后，知道了女孩收拾好东西了，可以正式分手了，于是再次写信告诉女孩：我知道了，这就去拿回来！</p> 
<p>这里双方都有各自的坚持。<br> 女孩自发出第二封信开始，限定一天内收不到男孩回信，就会再发一封信催促男孩来取东西！<br> 男孩自发出第二封信开始，限定两天内没有再次收到女孩的信就认为，女孩收到了自己的第二封信；若两天内再次收到女孩的来信，就认为自己的第二封信女孩没收到，需要再写一封信，再等两天……</p> 
<p>倘若双方信都能正常收到，最少只用四封信就能彻底分手！这就是“四次挥手”。</p> 
<p><mark><strong>为什么“握手”是三次，“挥手”却要四次？</strong></mark></p> 
<p>TCP建立连接时之所以只需要"三次握手"，是因为在第二次"握手"过程中，服务器端发送给客户端的TCP报文是以SYN与ACK作为标志位的。SYN是请求连接标志，表示服务器端同意建立连接；ACK是确认报文，表示告诉客户端，服务器端收到了它的请求报文。</p> 
<p>即SYN建立连接报文与ACK确认接收报文是在同一次"握手"当中传输的，所以"三次握手"不多也不少，正好让双方明确彼此信息互通。</p> 
<p>TCP释放连接时之所以需要“四次挥手”,是因为FIN释放连接报文与ACK确认接收报文是分别由第二次和第三次"握手"传输的。为何建立连接时一起传输，释放连接时却要分开传输？</p> 
<p>建立连接时，被动方服务器端结束CLOSED阶段进入“握手”阶段并不需要任何准备，可以直接返回SYN和ACK报文，开始建立连接。<br> 释放连接时，被动方服务器，突然收到主动方客户端释放连接的请求时并不能立即释放连接，因为还有必要的数据需要处理，所以服务器先返回ACK确认收到报文，经过CLOSE-WAIT阶段准备好释放连接之后，才能返回FIN释放连接报文。</p> 
<p>所以是“三次握手”，“四次挥手”。</p> 
<h1><a name="t14"></a><a id="_TCP_162"></a>四. TCP通信程序</h1> 
<h2><a name="t15"></a><a id="1TCP_163"></a>1、TCP通信原理</h2> 
<p><mark>TCP通信协议</mark>是一种<mark>可靠</mark>网络协议，它在<mark>通信的两端各建立一个Socket对象</mark>，从而在通信的两端形成网<mark>络虚拟链路</mark>，一旦建立了虚拟的网络链路，两端的程序就可以通过虚拟链路进行通信。</p> 
<ul><li> <p>使用基于<mark>TCP协议</mark>的<mark>Socket网络编程</mark>实现，使用<mark>Socket对象</mark>来代表两端的通信端口</p> </li><li> <p>TCP协议基于<mark>请求-响应模式</mark>，第一次<mark>主动发起的程序</mark>被称为<mark>客户端(Client)程序</mark></p> </li><li> <p>第一次通讯中<mark>等待连接的程序</mark>被称为<mark>服务器端(Sercer)程序</mark><br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/868b4df014c045f8a546880cdec5d831.png" alt="在这里插入图片描述"></p> </li></ul> 
<hr> 
<p>Java为客户端提供了Socket类，为服务器端提供了ServerSocket类</p> 
<p>Socket类<br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/de3e34e28d73425dbe229346aaa754f8.png" alt="在这里插入图片描述"><br> <strong>常用构造器</strong></p> 
<div class="table-box"><table><thead><tr><th>构造方法</th><th>说明</th></tr></thead><tbody><tr><td>Socket(InetAddress address, int port)</td><td>创建流套接字并将其连接到指定IP地址的指定端口号</td></tr><tr><td>Socket(String host, int port)</td><td>创建流套接字并将其连接到指定主机上的指定端口号</td></tr></tbody></table></div> 
<p><strong>常用方法</strong></p> 
<div class="table-box"><table><thead><tr><th>常用方法</th><th>说明</th></tr></thead><tbody><tr><td>OutputStream getOutputStream()</td><td>返回此套接字的输出流</td></tr><tr><td>InputStream getInputStream()</td><td>返回此套接字的输入流</td></tr><tr><td>void shutdownOutput()</td><td>禁用此套接字的输出流</td></tr></tbody></table></div> 
<p><strong>ServerSocket类</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/112924ac446d43248a51e096cea87a5e.png" alt="在这里插入图片描述"><br> <strong>常用构造器</strong></p> 
<div class="table-box"><table><thead><tr><th>构造方法</th><th>说明</th></tr></thead><tbody><tr><td>ServerSocket(int port)</td><td>创建绑定到指定端口的服务器套接字</td></tr></tbody></table></div> 
<p><strong>常用方法</strong></p> 
<div class="table-box"><table><thead><tr><th>常用方法</th><th>说明</th></tr></thead><tbody><tr><td>Socket accept()</td><td>侦听要连接到此套接字并接受它</td></tr></tbody></table></div> 
<hr> 
<h2><a name="t16"></a><a id="2TCP_205"></a>2、TCP发送数据</h2> 
<p><strong>练习一：简单的发送和接收数据</strong></p> 
<ul><li> <p><strong>服务器端</strong></p> 
  <ul><li>创建ServerSocket(int port)对象</li><li>在Socket上使用accept方法监听客户端的连接请求</li><li>阻塞、等待连接的建立</li><li>接收并处理请求信息</li><li>将处理结果返回给客户端</li><li>关闭流和Socket对象</li></ul> </li><li> <p><strong>客户端</strong></p> 
  <ul><li>创建Socket(String host, int port)对象</li><li>向服务器发送连接请求</li><li>向服务器发送服务请求</li><li>接受服务结果(服务响应)</li><li>关闭流和Socket对象</li></ul> </li></ul> 
<hr> 
<p><strong>示例代码</strong></p> 
<p><strong>服务端</strong></p> 
<pre data-index="0" class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson02</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">ByteArrayInputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">ByteArrayOutputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">IOException</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">InputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">ServerSocket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">Socket</span><span class="token punctuation">;</span>

<span class="token comment">//服务端</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TcpServerDemo01</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token class-name">ServerSocket</span> serverSocket <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token class-name">Socket</span> socket <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token class-name">InputStream</span> is <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token class-name">ByteArrayOutputStream</span> baos <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token comment">//1.我得有一个地址</span>
        <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
             serverSocket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ServerSocket</span><span class="token punctuation">(</span><span class="token number">9999</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">//2.等待客户端连接过来</span>
            socket <span class="token operator">=</span> serverSocket<span class="token punctuation">.</span><span class="token function">accept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">//3.读取客户端的消息</span>
             is <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getInputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">//管道流</span>
             baos <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ByteArrayOutputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
            <span class="token keyword">int</span> len<span class="token punctuation">;</span>
            <span class="token keyword">while</span><span class="token punctuation">(</span><span class="token punctuation">(</span>len<span class="token operator">=</span>is<span class="token punctuation">.</span><span class="token function">read</span><span class="token punctuation">(</span>buffer<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">!=</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                baos<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>buffer<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>len<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
            <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>baos<span class="token punctuation">.</span><span class="token function">toString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            baos<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            is<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            serverSocket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token keyword">finally</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">//关闭资源</span>
            <span class="token keyword">if</span><span class="token punctuation">(</span>baos <span class="token operator">!=</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    baos<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">if</span><span class="token punctuation">(</span>baos <span class="token operator">!=</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    is<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span><span class="token keyword">if</span><span class="token punctuation">(</span>baos <span class="token operator">!=</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">if</span><span class="token punctuation">(</span>serverSocket <span class="token operator">!=</span> <span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    baos<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li><li style="color: rgb(153, 153, 153);">48</li><li style="color: rgb(153, 153, 153);">49</li><li style="color: rgb(153, 153, 153);">50</li><li style="color: rgb(153, 153, 153);">51</li><li style="color: rgb(153, 153, 153);">52</li><li style="color: rgb(153, 153, 153);">53</li><li style="color: rgb(153, 153, 153);">54</li><li style="color: rgb(153, 153, 153);">55</li><li style="color: rgb(153, 153, 153);">56</li><li style="color: rgb(153, 153, 153);">57</li><li style="color: rgb(153, 153, 153);">58</li><li style="color: rgb(153, 153, 153);">59</li><li style="color: rgb(153, 153, 153);">60</li><li style="color: rgb(153, 153, 153);">61</li><li style="color: rgb(153, 153, 153);">62</li><li style="color: rgb(153, 153, 153);">63</li><li style="color: rgb(153, 153, 153);">64</li><li style="color: rgb(153, 153, 153);">65</li><li style="color: rgb(153, 153, 153);">66</li><li style="color: rgb(153, 153, 153);">67</li><li style="color: rgb(153, 153, 153);">68</li><li style="color: rgb(153, 153, 153);">69</li></ul></pre> 
<p><strong>客户端</strong></p> 
<pre data-index="1" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson02</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">IOException</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">OutputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">InetAddress</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">Socket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">UnknownHostException</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>nio<span class="token punctuation">.</span>charset<span class="token punctuation">.</span></span><span class="token class-name">StandardCharsets</span><span class="token punctuation">;</span>

<span class="token comment">//客户端</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TcpClientDemo01</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

        <span class="token class-name">Socket</span> socket <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token class-name">OutputStream</span> os <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
        <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
            <span class="token comment">//1.要知道服务器的地址</span>
            <span class="token class-name">InetAddress</span> serverIP <span class="token operator">=</span> <span class="token class-name">InetAddress</span><span class="token punctuation">.</span><span class="token function">getByName</span><span class="token punctuation">(</span><span class="token string">"127.0.0.1"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">//2.端口号</span>
            <span class="token keyword">int</span> port <span class="token operator">=</span> <span class="token number">9999</span><span class="token punctuation">;</span>
            <span class="token comment">//3.创建一个socket连接</span>
            socket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Socket</span><span class="token punctuation">(</span>serverIP<span class="token punctuation">,</span>port<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token comment">//4.发送消息IO流</span>
            os <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getOutputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            os<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span><span class="token string">"你好，欢迎学习狂神说Java"</span><span class="token punctuation">.</span><span class="token function">getBytes</span><span class="token punctuation">(</span><span class="token class-name">StandardCharsets</span><span class="token punctuation">.</span>UTF_8<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">UnknownHostException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span><span class="token keyword">finally</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">if</span><span class="token punctuation">(</span>os<span class="token operator">!=</span><span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    os<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
            <span class="token keyword">if</span> <span class="token punctuation">(</span>socket<span class="token operator">!=</span><span class="token keyword">null</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                    socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li></ul></pre> 
<hr> 
<p><strong>结果如下</strong></p> 
<p><strong>服务端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d2bf0bb5156a4dfd9b4cb279ea8ccbf0.png" alt="在这里插入图片描述"><br> <strong>客户端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/33e6cc0f361d44c983c10f80b3ecc4e9.png" alt="在这里插入图片描述"></p> 
<hr> 
<p><strong>练习二：下载图片</strong></p> 
<ul><li>客户端：读取发送图片</li><li>服务端：接收输出图片</li></ul> 
<hr> 
<p><strong>示例代码</strong></p> 
<p><strong>服务端</strong></p> 
<pre data-index="2" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson02</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token operator">*</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">ServerSocket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">Socket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>nio<span class="token punctuation">.</span>charset<span class="token punctuation">.</span></span><span class="token class-name">StandardCharsets</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>util<span class="token punctuation">.</span></span><span class="token class-name">Scanner</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TcpServerDemo02</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span><span class="token punctuation">{<!-- --></span>
        <span class="token comment">//1.创建服务</span>
        <span class="token class-name">ServerSocket</span> serverSocket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ServerSocket</span><span class="token punctuation">(</span><span class="token number">9000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//2.监听客户端的连接</span>
        <span class="token class-name">Socket</span> socket <span class="token operator">=</span> serverSocket<span class="token punctuation">.</span><span class="token function">accept</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//阻塞式监听，会一直等待客户端</span>
        <span class="token comment">// 3.获取输入流</span>
        <span class="token class-name">InputStream</span> is <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getInputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//4.文件输出</span>
        <span class="token class-name">FileOutputStream</span> fos <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">FileOutputStream</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">File</span><span class="token punctuation">(</span><span class="token string">"receive.jpg"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        <span class="token keyword">int</span> len<span class="token punctuation">;</span>
        <span class="token keyword">while</span><span class="token punctuation">(</span><span class="token punctuation">(</span>len<span class="token operator">=</span>is<span class="token punctuation">.</span><span class="token function">read</span><span class="token punctuation">(</span>buffer<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">!=</span><span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            fos<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>buffer<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>len<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token comment">//通知客户端我接收完毕了</span>
        <span class="token class-name">OutputStream</span> os <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getOutputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        os<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span><span class="token string">"我接收完毕了，你可以断开了"</span><span class="token punctuation">.</span><span class="token function">getBytes</span><span class="token punctuation">(</span><span class="token class-name">StandardCharsets</span><span class="token punctuation">.</span>UTF_8<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//关闭资源</span>
        fos<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        is<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        serverSocket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li></ul></pre> 
<p><strong>客户端</strong></p> 
<pre data-index="3" class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson02</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token operator">*</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">InetAddress</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">Socket</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TcpClientDemo02</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span><span class="token punctuation">{<!-- --></span>
        <span class="token comment">//1.创建一个socket连接</span>
        <span class="token class-name">Socket</span> socket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Socket</span><span class="token punctuation">(</span><span class="token class-name">InetAddress</span><span class="token punctuation">.</span><span class="token function">getByName</span><span class="token punctuation">(</span><span class="token string">"127.0.0.1"</span><span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token number">9000</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//2.创建一个输出流</span>
        <span class="token class-name">OutputStream</span> os <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getOutputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//3.读取文件</span>
        <span class="token class-name">FileInputStream</span> fis <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">FileInputStream</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">File</span><span class="token punctuation">(</span><span class="token string">"lin.jpg"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//4.写入文件</span>
        <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        <span class="token keyword">int</span> len<span class="token punctuation">;</span>
        <span class="token keyword">while</span><span class="token punctuation">(</span><span class="token punctuation">(</span>len<span class="token operator">=</span>fis<span class="token punctuation">.</span><span class="token function">read</span><span class="token punctuation">(</span>buffer<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">!=</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            os<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>buffer<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>len<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token comment">//通知服务器，我已经结束了</span>
        socket<span class="token punctuation">.</span><span class="token function">shutdownOutput</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//我已经传输完了</span>

        <span class="token comment">//确定服务器接收完毕，才能断开连接</span>
        <span class="token class-name">InputStream</span> inputStream <span class="token operator">=</span> socket<span class="token punctuation">.</span><span class="token function">getInputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//String byte[]</span>
        <span class="token class-name">ByteArrayOutputStream</span> baos <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ByteArrayOutputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer2 <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">2014</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        <span class="token keyword">int</span> len2<span class="token punctuation">;</span>
        <span class="token keyword">while</span><span class="token punctuation">(</span><span class="token punctuation">(</span>len2<span class="token operator">=</span>inputStream<span class="token punctuation">.</span><span class="token function">read</span><span class="token punctuation">(</span>buffer2<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token operator">!=</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
            baos<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>buffer2<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>len2<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
        <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>baos<span class="token punctuation">.</span><span class="token function">toString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//5.关闭资源</span>
        fis<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        os<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li></ul></pre> 
<hr> 
<p><strong>结果如下</strong></p> 
<p><strong>服务端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/858b9e4f9686473e843b64882587e2eb.png" alt="在这里插入图片描述"><br> <strong>客户端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/5b14284407c64ebe91080fd81587f8a6.png" alt="在这里插入图片描述"></p> 
<h1><a name="t17"></a><a id="_UDP_458"></a>五. UDP通信程序</h1> 
<h2><a name="t18"></a><a id="1_UDP_459"></a>1、 UDP通信原理</h2> 
<ul><li> <p><mark>UDP协议</mark>是一种<mark>不可靠</mark>的网络协议，它在通信的两端各建立一个Socket对象，但是这两个Socket只是发送，接收数据的对象</p> </li><li> <p>基于UDP协议的通信双方而言，<mark>没有客户端和服务器概念</mark></p> </li></ul> 
<p><strong>Java提供了DatagramSocket类和DatagramPacket类</strong></p> 
<ul><li> <p>DatagramSocket：用于发送或接收数据包的套接字</p> </li><li> <p>DatagramPacket：数据包</p> </li></ul> 
<hr> 
<p><strong>DatagramSocket类</strong></p> 
<ul><li> <p>此类表示用于发送和接收数据报数据包的套接字</p> </li><li> <p><mark>数据报套接字</mark>是分组传送服务的发送或接收点</p> </li></ul> 
<p><strong>常用构造器</strong></p> 
<div class="table-box"><table><thead><tr><th>常用构造器</th><th>说明</th></tr></thead><tbody><tr><td>DatagramSocket()</td><td>构造数据报套接字并将其绑定到本地主机上的任何可用端口</td></tr><tr><td>DatagramSocket(int port)</td><td>构造数据报套接字并将其绑定到本地主机上的指定端口</td></tr></tbody></table></div> 
<p><strong>常用方法</strong></p> 
<div class="table-box"><table><thead><tr><th>常用方法</th><th>说明</th></tr></thead><tbody><tr><td>void send(DatagramPacket p)</td><td>从此套接字发送数据报包</td></tr><tr><td>void receive(DatagramPacket p)</td><td>从此套接字接收数据报包（阻塞式的接收)</td></tr></tbody></table></div> 
<hr> 
<p><strong>DatagramPacket类</strong></p> 
<ul><li> <p>该类表示数据报包</p> </li><li> <p>数据报包用于实现无连接分组传送服务</p> </li></ul> 
<p><strong>常用构造器</strong></p> 
<div class="table-box"><table><thead><tr><th>常用构造器</th><th>说明</th></tr></thead><tbody><tr><td>（接收方） DatagramPacket(byte[] buf, int length)</td><td>构造一个 DatagramPacket用于接收长度的数据包 length</td></tr><tr><td>（发送方）DatagramPacket(byte[] buf, int offset, int length, InetAddress address, int port)</td><td>构造用于发送指定长度的数据报包到指定主机的指定端口号上</td></tr></tbody></table></div> 
<p><strong>常用方法</strong></p> 
<div class="table-box"><table><thead><tr><th>常用方法</th><th>说明</th></tr></thead><tbody><tr><td>int getLength()</td><td>返回要发送的数据的长度或接收到的数据的长度</td></tr><tr><td>byte[] getData()</td><td>返回数据缓冲区</td></tr></tbody></table></div> 
<h2><a name="t19"></a><a id="2PacketDatagramSocket_510"></a>2、三个概念：数据包(Packet)、数据报(Datagram)和套接字(Socket)</h2> 
<h3><a name="t20"></a><a id="21Datagram_512"></a>2.1、数据报(Datagram)</h3> 
<p>数据报是通过<mark>网络传输的数据</mark>的基本单元，包含一个报头（header）和数据本身，其中报头描述了数据的目的地以及和其它数据之间的关系。数据报是完备的、独立的数据实体，该实体携带要从源计算机传递到目的计算机的信息，该信息不依赖以前在源计算机和目的计算机以及传输网络间交换。</p> 
<p>UDP数据报的长度是指包括<mark>报头和数据部分在内的总字节数</mark>，其中报头长度固定，数据部分可变。数据报的最大长度根据操作环境的不同而各异。从理论上说，包含报头在内的数据报的最大长度为65535字节(64K)</p> 
<p>我们在用Socket编程时，UDP协议要求包小于64K，TCP没有限定</p> 
<h3><a name="t21"></a><a id="22Socket_520"></a>2.2、套接字(Socket)</h3> 
<p>所谓套接字(Socket)，就是对网络中不同主机上的<mark>应用进程</mark>之间进行<mark>双向通信</mark>的端点的抽象</p> 
<p>从所处的地位来讲，套接字上联应用进程，下联网络协议栈，是应用程序通过网络协议进行通信的接口，是应用程序与网络协议根进行交互的接口</p> 
<h3><a name="t22"></a><a id="23Packet_526"></a>2.3、数据包(Packet)</h3> 
<p>包(Packet)是<mark>TCP/IP协议通信传输中的数据单位</mark>，一般也称“数据包”</p> 
<h2><a name="t23"></a><a id="3_UDP_529"></a>3、 UDP发送数据</h2> 
<p><strong>练习一：简单的信息发送</strong></p> 
<ul><li>创建发送端的Socket对象(DatagramSocket)。如果没有指定端口，发送到本地主机所有可用端口（不常用），这里可以采用指定端口构造方法</li><li>创建数据，并把数据封装成DatagramPacket包裹，数据一定要转成字节数组，同时需要指定IP地址和端口</li><li>调用DatagraSocket对象的方法发送数据包裹</li><li>关闭发送端，释放资源</li></ul> 
<hr> 
<p><strong>示例代码</strong></p> 
<p><strong>服务端</strong></p> 
<pre data-index="4" class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson03</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramPacket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramSocket</span><span class="token punctuation">;</span>

<span class="token comment">//还是要等待客户端的连接</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">UdpserverDemo01</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span><span class="token punctuation">{<!-- --></span>
        <span class="token comment">//开放端口</span>
        <span class="token class-name">DatagramSocket</span> socket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramSocket</span><span class="token punctuation">(</span><span class="token number">9990</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//接收数据包</span>
        <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

        <span class="token class-name">DatagramPacket</span> packet <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramPacket</span><span class="token punctuation">(</span>buffer<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>buffer<span class="token punctuation">.</span>length<span class="token punctuation">)</span><span class="token punctuation">;</span>
        socket<span class="token punctuation">.</span><span class="token function">receive</span><span class="token punctuation">(</span>packet<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//阻塞接收</span>

        <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>packet<span class="token punctuation">.</span><span class="token function">getAddress</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getHostAddress</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">String</span><span class="token punctuation">(</span>packet<span class="token punctuation">.</span><span class="token function">getData</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>packet<span class="token punctuation">.</span><span class="token function">getLength</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//关闭连接</span>
        socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li></ul></pre> 
<p><strong>客户端</strong></p> 
<pre data-index="5" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson03</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramPacket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramSocket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">InetAddress</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>nio<span class="token punctuation">.</span>charset<span class="token punctuation">.</span></span><span class="token class-name">StandardCharsets</span><span class="token punctuation">;</span>


<span class="token comment">//不需要连接服务器</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">UdpClientDemo01</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span><span class="token punctuation">{<!-- --></span>
        <span class="token comment">//1.建立一个Socket</span>
        <span class="token class-name">DatagramSocket</span> socket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramSocket</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">//2.建个包</span>
        <span class="token class-name">String</span> msg <span class="token operator">=</span> <span class="token string">"你好啊，服务器！"</span><span class="token punctuation">;</span>

        <span class="token comment">//3.发送给谁</span>
        <span class="token class-name">InetAddress</span> localhost <span class="token operator">=</span> <span class="token class-name">InetAddress</span><span class="token punctuation">.</span><span class="token function">getByName</span><span class="token punctuation">(</span><span class="token string">"localhost"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">int</span> port <span class="token operator">=</span> <span class="token number">9990</span><span class="token punctuation">;</span>

        <span class="token comment">//数据，数据的长度起始，要发送给谁</span>
        <span class="token class-name">DatagramPacket</span> packet <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramPacket</span><span class="token punctuation">(</span>msg<span class="token punctuation">.</span><span class="token function">getBytes</span><span class="token punctuation">(</span><span class="token class-name">StandardCharsets</span><span class="token punctuation">.</span>UTF_8<span class="token punctuation">)</span><span class="token punctuation">,</span>msg<span class="token punctuation">.</span><span class="token function">getBytes</span><span class="token punctuation">(</span><span class="token class-name">StandardCharsets</span><span class="token punctuation">.</span>UTF_8<span class="token punctuation">)</span><span class="token punctuation">.</span>length<span class="token punctuation">,</span>localhost<span class="token punctuation">,</span>port<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">//4.发送包</span>
        socket<span class="token punctuation">.</span><span class="token function">send</span><span class="token punctuation">(</span>packet<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">//5.关闭流</span>
        socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li></ul></pre> 
<hr> 
<p><strong>结果如下</strong></p> 
<p><strong>服务端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bc80b58888af491a973643530c00f4d9.png" alt="在这里插入图片描述"></p> 
<p><strong>客户端</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/6a4a301fe7a94f968d8c7e7a2853cb86.png" alt="在这里插入图片描述"></p> 
<hr> 
<p><strong>练习二：一对一线上咨询</strong></p> 
<p>需求：</p> 
<ul><li>完成在线咨询功能</li><li>学生和咨询师在线一对一交流</li><li>加入多线程，可以双向交流</li><li>聊天终止条件为输入"bye"</li></ul> 
<p><strong>示例代码</strong></p> 
<p><strong>客户端</strong></p> 
<pre data-index="6" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token comment">//客户端</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TalkSend</span> <span class="token keyword">implements</span> <span class="token class-name">Runnable</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">private</span> <span class="token class-name">DatagramSocket</span> client<span class="token punctuation">;</span>
    <span class="token keyword">private</span> <span class="token class-name">BufferedReader</span> reader<span class="token punctuation">;</span>
    <span class="token keyword">private</span> <span class="token class-name">String</span> toIP<span class="token punctuation">;</span>    <span class="token comment">// 对方的IP地址</span>
    <span class="token keyword">private</span> <span class="token keyword">int</span> toPort<span class="token punctuation">;</span>     <span class="token comment">// 对方的端口</span>

    <span class="token keyword">public</span> <span class="token class-name">TalkSend</span><span class="token punctuation">(</span><span class="token keyword">int</span> port<span class="token punctuation">,</span> <span class="token class-name">String</span> toIP<span class="token punctuation">,</span> <span class="token keyword">int</span> toPort<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>toIP <span class="token operator">=</span> toIP<span class="token punctuation">;</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>toPort <span class="token operator">=</span> toPort<span class="token punctuation">;</span>

        <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
            client <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramSocket</span><span class="token punctuation">(</span>port<span class="token punctuation">)</span><span class="token punctuation">;</span>
            reader <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">BufferedReader</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">InputStreamReader</span><span class="token punctuation">(</span><span class="token class-name">System</span><span class="token punctuation">.</span>in<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">SocketException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">run</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token class-name">String</span> data<span class="token punctuation">;</span>
            <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                data <span class="token operator">=</span> reader<span class="token punctuation">.</span><span class="token function">readLine</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> datas <span class="token operator">=</span> data<span class="token punctuation">.</span><span class="token function">getBytes</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token comment">// 封装成DatagramPacket包裹，指定目的地</span>
                <span class="token class-name">DatagramPacket</span> packet <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramPacket</span><span class="token punctuation">(</span>datas<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> datas<span class="token punctuation">.</span>length<span class="token punctuation">,</span>
                        <span class="token keyword">new</span> <span class="token class-name">InetSocketAddress</span><span class="token punctuation">(</span><span class="token keyword">this</span><span class="token punctuation">.</span>toIP<span class="token punctuation">,</span> <span class="token keyword">this</span><span class="token punctuation">.</span>toPort<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                client<span class="token punctuation">.</span><span class="token function">send</span><span class="token punctuation">(</span>packet<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token comment">// 终止条件</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>data<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span><span class="token string">"bye"</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    <span class="token keyword">break</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        <span class="token comment">// 释放资源</span>
        client<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li></ul></pre> 
<p><strong>服务端</strong></p> 
<pre data-index="7" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson03</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">IOException</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramPacket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">DatagramSocket</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">SocketException</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TalkReceive</span> <span class="token keyword">implements</span> <span class="token class-name">Runnable</span><span class="token punctuation">{<!-- --></span>

    <span class="token class-name">DatagramSocket</span> socket <span class="token operator">=</span> <span class="token keyword">null</span><span class="token punctuation">;</span>
    <span class="token keyword">private</span> <span class="token keyword">int</span> port<span class="token punctuation">;</span>
    <span class="token keyword">private</span> <span class="token class-name">String</span> msgFrom<span class="token punctuation">;</span>

    <span class="token keyword">public</span> <span class="token class-name">TalkReceive</span><span class="token punctuation">(</span><span class="token keyword">int</span> port<span class="token punctuation">,</span><span class="token class-name">String</span> msgFrom<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>port <span class="token operator">=</span> port<span class="token punctuation">;</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>msgFrom <span class="token operator">=</span> msgFrom<span class="token punctuation">;</span>
        <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
            socket <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramSocket</span><span class="token punctuation">(</span>port<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">SocketException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">run</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>

        <span class="token keyword">while</span> <span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
            <span class="token keyword">try</span> <span class="token punctuation">{<!-- --></span>
                <span class="token comment">//准备接收包裹</span>
                <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> container <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
                <span class="token class-name">DatagramPacket</span> packet <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DatagramPacket</span><span class="token punctuation">(</span>container<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> container<span class="token punctuation">.</span>length<span class="token punctuation">)</span><span class="token punctuation">;</span>
                socket<span class="token punctuation">.</span><span class="token function">receive</span><span class="token punctuation">(</span>packet<span class="token punctuation">)</span><span class="token punctuation">;</span><span class="token comment">//阻塞式接收包裹</span>

                <span class="token comment">//断开连接 bye</span>
                <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> data <span class="token operator">=</span> packet<span class="token punctuation">.</span><span class="token function">getData</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token class-name">String</span> receiveData <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">String</span><span class="token punctuation">(</span>data<span class="token punctuation">,</span> <span class="token number">0</span><span class="token punctuation">,</span> data<span class="token punctuation">.</span>length<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token class-name">System</span><span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>msgFrom <span class="token operator">+</span> <span class="token string">"："</span> <span class="token operator">+</span> receiveData<span class="token punctuation">)</span><span class="token punctuation">;</span>
                <span class="token keyword">if</span> <span class="token punctuation">(</span>receiveData<span class="token punctuation">.</span><span class="token function">equals</span><span class="token punctuation">(</span><span class="token string">"bye"</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                    <span class="token keyword">break</span><span class="token punctuation">;</span>
                <span class="token punctuation">}</span>
            <span class="token punctuation">}</span> <span class="token keyword">catch</span> <span class="token punctuation">(</span><span class="token class-name">IOException</span> e<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
                e<span class="token punctuation">.</span><span class="token function">printStackTrace</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>
        <span class="token punctuation">}</span>
        socket<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li><li style="color: rgb(153, 153, 153);">31</li><li style="color: rgb(153, 153, 153);">32</li><li style="color: rgb(153, 153, 153);">33</li><li style="color: rgb(153, 153, 153);">34</li><li style="color: rgb(153, 153, 153);">35</li><li style="color: rgb(153, 153, 153);">36</li><li style="color: rgb(153, 153, 153);">37</li><li style="color: rgb(153, 153, 153);">38</li><li style="color: rgb(153, 153, 153);">39</li><li style="color: rgb(153, 153, 153);">40</li><li style="color: rgb(153, 153, 153);">41</li><li style="color: rgb(153, 153, 153);">42</li><li style="color: rgb(153, 153, 153);">43</li><li style="color: rgb(153, 153, 153);">44</li><li style="color: rgb(153, 153, 153);">45</li><li style="color: rgb(153, 153, 153);">46</li><li style="color: rgb(153, 153, 153);">47</li></ul></pre> 
<p><strong>学生方</strong></p> 
<pre data-index="8" class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson03</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TalkStudent</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token comment">//开启两个线程</span>
        <span class="token keyword">new</span> <span class="token class-name">Thread</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">TalkSend</span><span class="token punctuation">(</span><span class="token number">7777</span><span class="token punctuation">,</span><span class="token string">"localhost"</span><span class="token punctuation">,</span><span class="token number">9999</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">new</span> <span class="token class-name">Thread</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">TalkReceive</span><span class="token punctuation">(</span><span class="token number">8888</span><span class="token punctuation">,</span><span class="token string">"老师"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li></ul></pre> 
<p><strong>老师方</strong></p> 
<pre data-index="9" class="prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson03</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">TalkTeacher</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token punctuation">{<!-- --></span>
        <span class="token keyword">new</span> <span class="token class-name">Thread</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">TalkSend</span><span class="token punctuation">(</span><span class="token number">5555</span><span class="token punctuation">,</span><span class="token string">"localhost"</span><span class="token punctuation">,</span><span class="token number">8888</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token keyword">new</span> <span class="token class-name">Thread</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">TalkReceive</span><span class="token punctuation">(</span><span class="token number">9999</span><span class="token punctuation">,</span><span class="token string">"学生"</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">start</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li></ul></pre> 
<p><strong>结果如下</strong></p> 
<p><strong>学生方</strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/8988a8236c0d4f03bb034669c619c571.png" alt="在这里插入图片描述"><br> <strong>老师方</strong><br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d9e059f6d1fd4fffbdee050e4ee42486.png" alt="在这里插入图片描述"><br> <strong><mark>这里强调一下，UDP编程属于底层开发，是网络编程，而不是网页编程，网页编程中这种Socket已经被实现</mark></strong></p> 
<hr> 
<h1><a name="t24"></a><a id="URL_755"></a>六、URL编程</h1> 
<h2><a name="t25"></a><a id="1URL_756"></a>1、URL类</h2> 
<p>URL(Uniform Resource Locator)：<mark>统一资源定位符</mark>，它表示 Internet 上某一资源的地址。</p> 
<p>它是一种具体的URI，即URL可以用来<mark>标识一个资源</mark>，而且还指明了如何locate这个资源。</p> 
<p>通过 URL 我们可以访问 Internet 上的各种网络资源，比如最常见的 www，ftp 站点。浏览器通过解析给定的 URL 可以在网络上查找相应的文件或其他资源。</p> 
<p>URL的基本结构由5部分组成：<br> &lt;传输协议&gt;://&lt;主机名&gt;:&lt;端口号&gt;/&lt;文件名&gt;#片段名?参数列表<br> 例如:</p> 
<ul><li>http://192.168.1.100:8080/helloworld/index.jsp#a?username=shkstart&amp;password=123</li><li>#片段名：即锚点，例如看小说，直接定位到章节</li><li>参数列表格式：参数名=参数值&amp;参数名=参数值…</li></ul> 
<p><strong>URL类构造器</strong></p> 
<div class="table-box"><table><thead><tr><th>public URL (String spec)</th><th>通过一个表示URL地址的字符串可以构造一个URL对象</th></tr></thead><tbody><tr><td>public URL(URL context, String spec)</td><td>通过基 URL 和相对 URL 构造一个 URL 对象</td></tr></tbody></table></div> 
<p><strong>URL类常用方法</strong></p> 
<div class="table-box"><table><thead><tr><th>public String getProtocol( )</th><th>获取该URL的协议名</th></tr></thead><tbody><tr><td>public String getHost( )</td><td>获取该URL的主机名</td></tr><tr><td>public String getPort( )</td><td>获取该URL的端口号</td></tr><tr><td>public String getPath( )</td><td>获取该URL的文件路径</td></tr><tr><td>public String getFile( )</td><td>获取该URL的文件名</td></tr><tr><td>public String getQuery( )</td><td>获取该URL的查询名</td></tr></tbody></table></div> 
<h2><a name="t26"></a><a id="2HTTPURLConnection_785"></a>2、针对HTTP协议的URLConnection类</h2> 
<p><mark>URL的方法 openStream()：能从网络上读取数据</mark></p> 
<p>若希望输出数据，例如向服务器端的 CGI （公共网关接口-Common Gateway Interface-的简称，是用户浏览器和服务器端的应用程序进行连接的接口）程序发送一些数据，则必须先与URL建立连接，然后才能对其进行读写，此时需要使用URLConnection 。</p> 
<p>URLConnection：<mark>表示到URL所引用的远程对象的连接</mark>。当与一个URL建立连接时，首先要在一个 URL 对象上通过方法 openConnection() 生成对应的 URLConnection对象。如果连接过程失败，将产生IOException。</p> 
<ul><li>URL netchinaren = new URL (“http://www.atguigu.com/index.shtml”);</li><li>URLConnectonn u = netchinaren.openConnection( );</li></ul> 
<p>通过URLConnection对象获取的输入流和输出流，即可以与现有的CGI程序进行交互。</p> 
<h2><a name="t27"></a><a id="3URL_797"></a>3、URL下载网络资源</h2> 
<p>需求：</p> 
<ul><li>自建了一个tomcat网站</li><li>下载该网站中的资源</li></ul> 
<hr> 
<p><strong>示例代码</strong></p> 
<pre data-index="10" class="set-code-hide prettyprint"><code class="prism language-java has-numbering" onclick="mdcp.copyCode(event)" style="position: unset;"><span class="token keyword">package</span> <span class="token namespace">com<span class="token punctuation">.</span>kuang<span class="token punctuation">.</span>lesson04</span><span class="token punctuation">;</span>

<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">FileOutputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>io<span class="token punctuation">.</span></span><span class="token class-name">InputStream</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span><span class="token class-name">HttpURLConnection</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">java<span class="token punctuation">.</span>net<span class="token punctuation">.</span></span>URL<span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">UrlDown</span> <span class="token punctuation">{<!-- --></span>
    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span><span class="token punctuation">{<!-- --></span>
            <span class="token class-name">URL</span> url <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token function">URL</span><span class="token punctuation">(</span><span class="token string">"http://localhost:8080/qinjiang/SecurityFile.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token comment">//2.连接到这个资源 HTTP</span>
            <span class="token class-name">HttpURLConnection</span> urlConnection <span class="token operator">=</span> <span class="token punctuation">(</span><span class="token class-name">HttpURLConnection</span><span class="token punctuation">)</span> url<span class="token punctuation">.</span><span class="token function">openConnection</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token class-name">InputStream</span> inputStream <span class="token operator">=</span> urlConnection<span class="token punctuation">.</span><span class="token function">getInputStream</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token class-name">FileOutputStream</span> fos <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">FileOutputStream</span><span class="token punctuation">(</span><span class="token string">"SecurityFile.txt"</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

            <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token punctuation">]</span> buffer <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token keyword">byte</span><span class="token punctuation">[</span><span class="token number">1024</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

            <span class="token keyword">int</span> len<span class="token punctuation">;</span>
            <span class="token keyword">while</span><span class="token punctuation">(</span><span class="token punctuation">(</span>len <span class="token operator">=</span> inputStream<span class="token punctuation">.</span><span class="token function">read</span><span class="token punctuation">(</span>buffer<span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token operator">!=</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">{<!-- --></span>
                fos<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>buffer<span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span>len<span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token punctuation">}</span>

            fos<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            inputStream<span class="token punctuation">.</span><span class="token function">close</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            urlConnection<span class="token punctuation">.</span><span class="token function">disconnect</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<div class="hljs-button {2}" data-title="复制"></div></code><div class="hide-preCode-box"><span class="hide-preCode-bt" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.7365&quot;}"><img class="look-more-preCode contentImg-no-view" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCodeMoreWhite.png" alt="" title=""></span></div><ul class="pre-numbering" style=""><li style="color: rgb(153, 153, 153);">1</li><li style="color: rgb(153, 153, 153);">2</li><li style="color: rgb(153, 153, 153);">3</li><li style="color: rgb(153, 153, 153);">4</li><li style="color: rgb(153, 153, 153);">5</li><li style="color: rgb(153, 153, 153);">6</li><li style="color: rgb(153, 153, 153);">7</li><li style="color: rgb(153, 153, 153);">8</li><li style="color: rgb(153, 153, 153);">9</li><li style="color: rgb(153, 153, 153);">10</li><li style="color: rgb(153, 153, 153);">11</li><li style="color: rgb(153, 153, 153);">12</li><li style="color: rgb(153, 153, 153);">13</li><li style="color: rgb(153, 153, 153);">14</li><li style="color: rgb(153, 153, 153);">15</li><li style="color: rgb(153, 153, 153);">16</li><li style="color: rgb(153, 153, 153);">17</li><li style="color: rgb(153, 153, 153);">18</li><li style="color: rgb(153, 153, 153);">19</li><li style="color: rgb(153, 153, 153);">20</li><li style="color: rgb(153, 153, 153);">21</li><li style="color: rgb(153, 153, 153);">22</li><li style="color: rgb(153, 153, 153);">23</li><li style="color: rgb(153, 153, 153);">24</li><li style="color: rgb(153, 153, 153);">25</li><li style="color: rgb(153, 153, 153);">26</li><li style="color: rgb(153, 153, 153);">27</li><li style="color: rgb(153, 153, 153);">28</li><li style="color: rgb(153, 153, 153);">29</li><li style="color: rgb(153, 153, 153);">30</li></ul></pre> 
<p><strong>结果如下</strong><br> <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/49b47edbb33e453e8550625e22cf96fb.png" alt="在这里插入图片描述"><br> <strong><mark>注意：这里字体格式没有改成UFT-8所以乱码</mark></strong></p> 
<p><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/05ce2b81536947faa04e3174805f087f.png" alt="在这里插入图片描述"></p> 
<h1><a name="t28"></a><a id="_841"></a>七、小结</h1> 
<ul><li>位于网络中的计算机具有唯<mark>一的IP地址</mark>，这样不同的主机可以互相区分</li><li><mark>客户端－服务器</mark>是一种最常见的<mark>网络应用程序模型</mark>。服务器是一个为其客户端提供某种特定服务的硬件或软件。客户机是一个用户应用程序，用于访问某台服务器提供的服务。端口号是对一个服务的访问场所，它用于区分同一物理计算机上的多个服务。套接字用于连接客户端和服务器，客户端和服务器之间的每个通信会话使用一个不同的套接字。<mark>TCP协议用于实现面向连接的会话</mark></li><li>Java 中有关网络方面的功能都定义在 java.net 程序包中。Java 用 InetAddress 对象表示 IP 地址，该对象里有两个字段：<mark>主机名(String) 和 IP 地址(int)</mark></li><li>类 <mark>Socket</mark> 和 <mark>ServerSocket</mark> 实现了基于<mark>TCP协议的客户端－服务器程序</mark>。Socket是客户端和服务器之间的一个连接，连接创建的细节被隐藏了。这个连接提供了一个安全的数据传输通道，这是因为 TCP 协议可以解决数据在传送过程中的丢失、损坏、重复、乱序以及网络拥挤等问题，它保证数据可靠的传送。</li><li>类 URL 和 URLConnection 提供了<mark>最高级</mark>网络应用。URL 的网络资源的位置来同一表示<br> Internet 上各种网络资源。通过URL对象可以创建当前应用程序和 URL 表示的网络资源之<br> 间的连接，这样当前程序就可以读取网络资源数据，或者把自己的数据传送到网络上去。</li></ul>
                </div><div data-report-view="{&quot;mod&quot;:&quot;1585297308_001&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6548&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127169869&quot;,&quot;extend1&quot;:&quot;pc&quot;,&quot;ab&quot;:&quot;new&quot;}"><div></div></div>
                <link href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/markdown_views-98b95bb57c.css" rel="stylesheet">
                <link href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/style-c216769e99.css" rel="stylesheet">
        </div>
        <div id="treeSkill" data-report-view="{&quot;spm&quot;:&quot;1001.2101.3001.6866&quot;}" style="display: block;"><div class="skill-tree-box"><div class="skill-tree-head">文章知识点与官方知识档案匹配，可进一步学习相关知识</div><div class="skill-tree-body"><div class="skill-tree-item"><span class="skill-tree-href"><a data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6866&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog&quot;}" href="https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog" target="_blank">网络技能树</a><i></i><a data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6866&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog&quot;}" href="https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog" target="_blank">跨区域网络的通信学习</a><i></i><a data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6866&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog&quot;}" href="https://edu.csdn.net/skill/network/network-8d8288ccd2b64a109c4f557efe592ac3?utm_source=csdn_ai_skill_tree_blog" target="_blank">网络层的作用</a></span><span class="skill-tree-con"><span class="skill-tree-count">34253</span> 人正在系统学习中</span></div></div></div></div>
    </article>
<script>
  $(function() {
    setTimeout(function () {
      var mathcodeList = document.querySelectorAll('.htmledit_views img.mathcode');
      if (mathcodeList.length > 0) {
        for (let i = 0; i < mathcodeList.length; i++) {
          if (mathcodeList[i].naturalWidth === 0 || mathcodeList[i].naturalHeight === 0) {
            var alt = mathcodeList[i].alt;
            alt = '\\(' + alt + '\\)';
            var curSpan = $('<span class="img-codecogs"></span>');
            curSpan.text(alt);
            $(mathcodeList[i]).before(curSpan);
            $(mathcodeList[i]).remove();
          }
        }
        MathJax.Hub.Queue(["Typeset",MathJax.Hub]);
      }
    }, 1000)
  });
</script>
</div>
    <div class="more-toolbox-new more-toolbox-active" id="toolBarBox">
      <div class="left-toolbox" style="position: fixed; z-index: 996; left: 344.333px; bottom: 0px; width: 1010px;">
        <div class="toolbox-left">
            <div class="profile-box">
              <a class="profile-href" target="_blank" href="https://blog.csdn.net/qq_52519008"><img class="profile-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bb2a03d43ed44186a8a4af512629451c_qq_52519008.jpg!1">
                <span class="profile-name">
                  酱紫学Java
                </span>
              </a>
            </div>
            <div class="profile-attend">
                <a class="tool-attend tool-bt-button tool-bt-attend" href="javascript:;">关注</a>
              <a class="tool-item-follow active-animation" style="display:none;">关注</a>
            </div>
        </div>
        <div class="toolbox-middle">
          <ul class="toolbox-list">
            <li class="tool-item tool-item-size tool-active is-like" id="is-like">
              <a class="tool-item-href">
                <img style="display:none;" id="is-like-imgactive-animation-like" class="animation-dom active-animation" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/tobarThumbUpactive.png" alt="">
                <img class="isactive" style="display:none" id="is-like-imgactive" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newHeart2021Active.png" alt="">
                <img class="isdefault" style="display:block" id="is-like-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newHeart2021Black.png" alt="">
                <span id="spanCount" class="count ">
                    4
                </span>
              </a>
              <div class="tool-hover-tip"><span class="text space">点赞</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-unlike" id="is-unlike">
              <a class="tool-item-href">
                <img class="isactive" style="margin-right:0px;display:none" id="is-unlike-imgactive" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newUnHeart2021Active.png" alt="">
                <img class="isdefault" style="margin-right:0px;display:block" id="is-unlike-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newUnHeart2021Black.png" alt="">
                <span id="unlikeCount" class="count "></span>
              </a>
              <div class="tool-hover-tip"><span class="text space">踩</span></div>
            </li>
            <li class="tool-item tool-item-size tool-active is-collection ">
              <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;popu_824&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4130&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img style="display:none" id="is-collection-img-collection" class="animation-dom active-animation" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/tobarCollectionActive.png" alt="">
                <img class="isdefault" id="is-collection-img" style="display:block" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCollectBlack.png" alt="">
                <img class="isactive" id="is-collection-imgactive" style="display:none" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newCollectActive.png" alt="">
                <span class="count get-collection" id="get-collection" style="color: rgb(153, 154, 170);">
                    9
                </span>
              </a>
              <div class="tool-hover-tip collect">
                <div class="collect-operate-box">
                  <span class="collect-text" id="is-collection">
                    收藏
                  </span>
                </div>
              </div>
              <div class="tool-active-list">
                <div class="text">
                  觉得还不错?
                  <span class="collect-text" id="tool-active-list-collection">
                    一键收藏
                  </span>
                 <img id="tool-active-list-close" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/collectionCloseWhite.png" alt="">
                </div>
              </div>
            </li>
          <li class="tool-item tool-item-size tool-active tool-item-comment">
            
              <a class="tool-item-href go-side-comment" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7009&quot;}">
              <img class="isdefault" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newComment2021Black.png" alt="">
              <span class="count">0</span>
            </a>
            <div class="tool-hover-tip"><span class="text space">评论</span></div>
          </li>
          <li class="tool-item tool-item-bar">
          </li>
          <li class="tool-item tool-item-size tool-active tool-QRcode" data-type="article" id="tool-share">
            <a class="tool-item-href" href="javascript:;" data-report-click="{&quot;mod&quot;:&quot;1582594662_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4129&quot;,&quot;ab&quot;:&quot;new&quot;}">
              <img class="isdefault" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/newShareBlack.png" alt="">
            </a>
              <div class="QRcode" id="tool-QRcode">
            <div class="share-bg-icon icon1 icon5" id="shareBgIcon"></div>
              <div class="share-bg-box">
                <div class="share-content">
                    <img class="share-avatar" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bb2a03d43ed44186a8a4af512629451c_qq_52519008.jpg!1" alt="">
                  <div class="share-tit">
                    Java基础——网络编程全网超详解！！！！！！！
                  </div>
                  <div class="share-dec">
                    若希望输出数据，例如向服务器端的 CGI （公共网关接口-Common Gateway Interface-的简称，是用户浏览器和服务器端的应用程序进行连接的接口）程序发送一些数据，则必须先与URL建立连接，然后才能对其进行读写，此时需要使用URLConnection。释放连接时，被动方服务器，突然收到主动方客户端释放连接的请求时并不能立即释放连接，因为还有必要的数据需要处理，所以服务器先返回ACK确认收到报文，经过CLOSE-WAIT阶段准备好释放连接之后，才能返回FIN释放连接报文。
                  </div>
                  <a id="copyPosterUrl" class="url" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7493&quot;}">复制链接</a>
                </div>
                <div class="share-code">
                  <div class="share-code-box" id="shareCode"><canvas width="65" height="65"></canvas><img style="display: none;"></div>
                  <div class="share-code-text">扫一扫</div>
                </div>
              </div>
                <div class="share-code-type"><p class="hot" data-type="hot"><span>热门</span></p><p class="vip" data-type="vip"><span>VIP</span></p></div>
            </div>
          </li>
        </ul>
      </div>
      <div class="toolbox-right">
            <div class="tool-directory">
                <a class="bt-columnlist-show" data-id="12042889" data-free="true" data-subscribe="false" data-title="Java基础入门" data-img="https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64" data-url="https://blog.csdn.net/qq_52519008/category_12042889.html" data-sum="22" data-people="8" data-price="0" data-oldprice="0" data-join="false" data-studyvip="false" data-studysubscribe="false" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.6334&quot;,&quot;extend1&quot;:&quot;专栏目录&quot;}">专栏目录</a>
          </div>
</div>
</div>
</div>
<script type="text/javascript" crossorigin="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/qrcode-7c90a92189.min.js.下载"></script>
<script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/saved_resource(2)" type="text/javascript"></script>
<script type="text/javascript" crossorigin="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-login-box.js.下载"></script>
<script type="text/javascript" crossorigin="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/collection-box.js.下载"></script>                <div class="first-recommend-box recommend-box ">
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38658471/12931680" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~Paid-1-12931680-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Paid&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38658471/12931680&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38658471/12931680" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~Paid-1-12931680-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Paid&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38658471/12931680&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-12931680-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-12931680-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=1">
					<div class="left ellipsis-online ellipsis-online-1">元器件应用中的<em>详解</em>场效应管——不就是一个电控开关！</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">10-15</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38658471/12931680" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6661.1&quot;,&quot;mod&quot;:&quot;popu_871&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant_t0.none-task-download-2~default~CTRLIST~Paid-1-12931680-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Paid&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38658471/12931680&quot;}" data-report-query="spm=1001.2101.3001.6661.1&amp;utm_medium=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-12931680-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant_t0.none-task-download-2%7Edefault%7ECTRLIST%7EPaid-1-12931680-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=1">
				<div class="desc ellipsis-online ellipsis-online-1">场效应管在mpn中，它的长相和我们常面讲的三极管非常像，所以有不少修朋友好长时间还分不清楚，统一的把这些长相相同的三极管、场效应管、双二极管、还有各种稳压IC统统称作“三个脚的管管”，呵呵，如果这样麻木不分的话，你的维修技术恐怕很难快速提高的哦!


	　　言归正传，说到场效应管的长相恐怕我就不用贴图了，在电路图中它常用


	


	


	


	　　表示，关于它的构造原理由于比较抽象，我们是通俗化讲它的使用，所以不去多讲，由于根据使用的场合要求不同做出来的种类繁多，特性也都不尽相同;我们在mpn中常用的一般是作为电源供电的电控之开关使用，所以需要通过电流比较</div>
			</a>
		</div>
	</div>
</div>
                </div>
              <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/pc_wap_commontools-ad67eb7a7a.min.js.下载" type="text/javascript" async=""></script>
                <div class="second-recommend-box recommend-box ">
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_46331050/article/details/117706050" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-117706050-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_46331050/article/details/117706050&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_46331050/article/details/117706050" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-117706050-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_46331050/article/details/117706050&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=2">
					<div class="left ellipsis-online ellipsis-online-1"><em>Java</em> <em>网络编程</em>（<em>超</em>级详细）</div>
					<div class="tag">热门推荐</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_46331050" target="_blank" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=2"><span class="blog-title">imByte的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-10</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					1万+
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_46331050/article/details/117706050" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.1&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-1-117706050-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;1&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_46331050/article/details/117706050&quot;}" data-report-query="spm=1001.2101.3001.6650.1&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-1-117706050-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=2">
				<div class="desc ellipsis-online ellipsis-online-1">1. <em>网络编程</em>
1.1 <em>网络编程</em>概述
计算机<em>网络</em>

是指将地理位置相同的具有独立功能的多台计算机及其外部设备，通过通信线路连接起来，在<em>网络</em>操作系统、<em>网络</em>管理软件及通信协议的管理和协调下，实现资源共享和信息传递的计算机系统


1.2 <em>网络编程</em>三要素
1、IP地址

要想让<em>网络</em>中的计算机能够互相通信，必须为计算机指定一个标识号，通过这个标识号来指定要接受数据的计算机和识别发送的计算机，而IP地址就是这个标识号，也就是设备的标识。

2、端口

<em>网络</em>的通信，本质上是两个应用程序的通信。每台计算机都有很多的应用程</div>
			</a>
		</div>
	</div>
</div>
                </div>
<a id="commentBox" name="commentBox"></a>
<div id="pcCommentBox" class="comment-box comment-box-new2 login-comment-box-new comment-box-nostyle" style="display:none">
    <div class="has-comment" style="display: none;">
      <div class="one-line-box">
        <div class="has-comment-tit go-side-comment">
          <span class="count">0</span>&nbsp;条评论
        </div>
        <div class="has-comment-con comment-operate-item"></div>
        <a class="has-comment-bt-right go-side-comment focus">写评论</a>
      </div>
    </div>
</div>              <div class="recommend-box insert-baidu-box recommend-box-style ">
                <div class="recommend-item-box no-index" style="display:none"></div>
<div class="recommend-item-box type_blog clearfix" data-url="https://timerring.blog.csdn.net/article/details/130573037" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~Position-2-130573037-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~YuanLiJiHua~Position&quot;,&quot;dest&quot;:&quot;https://timerring.blog.csdn.net/article/details/130573037&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://timerring.blog.csdn.net/article/details/130573037" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~Position-2-130573037-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~YuanLiJiHua~Position&quot;,&quot;dest&quot;:&quot;https://timerring.blog.csdn.net/article/details/130573037&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=3">
					<div class="left ellipsis-online ellipsis-online-1"><em>Java</em> <em>网络编程</em><em>详解</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/m0_52316372" target="_blank" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=3"><span class="blog-title">timerring的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-09</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					72
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://timerring.blog.csdn.net/article/details/130573037" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.2&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~YuanLiJiHua~Position-2-130573037-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;2&quot;,&quot;strategy&quot;:&quot;2~default~YuanLiJiHua~Position&quot;,&quot;dest&quot;:&quot;https://timerring.blog.csdn.net/article/details/130573037&quot;}" data-report-query="spm=1001.2101.3001.6650.2&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EYuanLiJiHua%7EPosition-2-130573037-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=3">
				<div class="desc ellipsis-online ellipsis-online-1"><em>网络</em>的相关概念
<em>网络</em>通信
<em>网络</em>
ip 地址
ipv4 地址分类
域名
<em>网络</em>通信协议
TCP 和 UDP
InetAddress 类
相关方法
应用案例
Socket
基本介绍
TCP <em>网络</em>通信编程
基本介绍
应用案例1(使用字节流)
应用案例2(使用字节流)
应用案例3(使用字符流)
应用案例4
netstat 指令
TCP <em>网络</em>通讯
UDP <em>网络</em>通信编程
基本介绍
基本流程
应用案例
本章作业</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/litianyichuanqi/3244109" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-3-3244109-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/litianyichuanqi/3244109&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/litianyichuanqi/3244109" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-3-3244109-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/litianyichuanqi/3244109&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-3-3244109-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-3-3244109-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=4">
					<div class="left ellipsis-online ellipsis-online-1"><em>详解</em>Discuz!X1.5 showmessage函数</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">05-03</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/litianyichuanqi/3244109" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.3&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-3-3244109-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;3&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/litianyichuanqi/3244109&quot;}" data-report-query="spm=1001.2101.3001.6650.3&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-3-3244109-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-3-3244109-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=4">
				<div class="desc ellipsis-online ellipsis-online-1"><em>详解</em>Discuz!X1.5 showmessage函数<em>详解</em>Discuz!X1.5 showmessage函数</div>
			</a>
		</div>
	</div>
</div>
		
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/ybb_ymm/87697274" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-4-87697274-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/ybb_ymm/87697274&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/ybb_ymm/87697274" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-4-87697274-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/ybb_ymm/87697274&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-4-87697274-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-4-87697274-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=5">
					<div class="left ellipsis-online ellipsis-online-1">ChatGPT原理<em>详解</em>！！！！</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">04-17</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/ybb_ymm/87697274" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.4&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-4-87697274-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;4&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/ybb_ymm/87697274&quot;}" data-report-query="spm=1001.2101.3001.6650.4&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-4-87697274-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-4-87697274-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=5">
				<div class="desc ellipsis-online ellipsis-online-1">ChatGPT比较详细的讲解原理知识</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38663151/15547852" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-5-15547852-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38663151/15547852&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38663151/15547852" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-5-15547852-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38663151/15547852&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-5-15547852-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-5-15547852-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=6">
					<div class="left ellipsis-online ellipsis-online-1"><em>详解</em>ApplePay：一大波iOS原生应用正在逼近！</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">03-03</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38663151/15547852" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.5&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~CTRLIST~Rate-5-15547852-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;5&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38663151/15547852&quot;}" data-report-query="spm=1001.2101.3001.6650.5&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-5-15547852-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7ECTRLIST%7ERate-5-15547852-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=6">
				<div class="desc ellipsis-online ellipsis-online-1">ApplePay不仅有TouchID指纹识别技术护航，支持AppleWatch，更有可观的iTunes信用卡绑定数量奠定其庞大的市场<em>基础</em>。本文从工作原理、安全性、适用范围、IAP到局限性及发展前景，详细解读ApplePay方方面面。在苹果新品发布会上，iPhone6以及出人意料的大屏iPhone6Plus终于在“千呼万唤”中娓娓登场，可惜这老戏码没能唱出新意来，倒是自家新出的智能手表AppleWatch还有那么点儿意思。除此之外，众人还将目光投向了苹果全新移动支付系统——ApplePay。ApplePay与诸多传统移动支付系统不同，不但有TouchID指纹识别技术护航，还能在AppleWatc</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_49342803/article/details/124652542" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-6-124652542-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_49342803/article/details/124652542&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_49342803/article/details/124652542" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-6-124652542-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_49342803/article/details/124652542&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=7">
					<div class="left ellipsis-online ellipsis-online-1"><em>网络编程</em>笔记</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_49342803" target="_blank" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=7"><span class="blog-title">weixin_49342803的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">05-08</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					111
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_49342803/article/details/124652542" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.6&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-6-124652542-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;6&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_49342803/article/details/124652542&quot;}" data-report-query="spm=1001.2101.3001.6650.6&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-6-124652542-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=7">
				<div class="desc ellipsis-online ellipsis-online-1">文章目录<em>网络编程</em>1.1概述1.2 <em>网络</em>通信的要素1.3 IP地址1.4 端口1.5 通讯协议==**TCP和UDP的区别**==**==TCP三次握手==**1.“三次握手”的通俗理解2.为什么要进行第三次握手==TCP的四次挥手==“四次挥手”的通俗理解为什么“握手”是三次，“挥手”却要四次？1.6 TCP协议1.TCP实现聊天2.TCP文件上传实现初识Tomcat1.7 UDP1.UDP消息发送2.UDP聊天实现（循环发送，循环接收）1.8 URL下载文件
<em>网络编程</em>
1.1概述
计算机<em>网络</em>：
计算机<em>网络</em></div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_course clearfix" data-url="https://edu.csdn.net/course/detail/30513" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-course-2~default~BlogCommendFromBaidu~Rate-7-30513-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/course/detail/30513&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://edu.csdn.net/course/detail/30513" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-course-2~default~BlogCommendFromBaidu~Rate-7-30513-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/course/detail/30513&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-course-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-30513-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-course-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-30513-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=8">
					<div class="left ellipsis-online ellipsis-online-1"><em>Java</em><em>网络编程</em>精讲</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">08-17</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://edu.csdn.net/course/detail/30513" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.7&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-course-2~default~BlogCommendFromBaidu~Rate-7-30513-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;7&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://edu.csdn.net/course/detail/30513&quot;}" data-report-query="spm=1001.2101.3001.6650.7&amp;utm_medium=distribute.pc_relevant.none-task-course-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-30513-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-course-2%7Edefault%7EBlogCommendFromBaidu%7ERate-7-30513-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=8">
				<div class="desc ellipsis-online ellipsis-online-1">本课程是《零<em>基础</em>学<em>Java</em>》系列课程中的<em>网络编程</em>部分知识点的课程，该课程详讲述了：计算机<em>网络</em>原理、ip协议、socket编程、tcp<em>网络编程</em>、udp<em>网络编程</em>相关知识点！课程风格细腻、柔和，知识点讲解由浅入深!全程手写代码，手把手教你学习<em>网络编程</em>！</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/L6666688888/article/details/121349942" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-8-121349942-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/L6666688888/article/details/121349942&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/L6666688888/article/details/121349942" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-8-121349942-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/L6666688888/article/details/121349942&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=9">
					<div class="left ellipsis-online ellipsis-online-1"><em>Java</em><em>网络编程</em>知识点总结</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/L6666688888" target="_blank" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=9"><span class="blog-title">暴力扬</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">11-16</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					834
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/L6666688888/article/details/121349942" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.8&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-8-121349942-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;8&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/L6666688888/article/details/121349942&quot;}" data-report-query="spm=1001.2101.3001.6650.8&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-8-121349942-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=9">
				<div class="desc ellipsis-online ellipsis-online-1"><em>网络编程</em>概述
计算机<em>网络</em>
·是指将地理位置不同的具有独立功能的多台计算机及其外部设备，通过通信线路连接起来，
在<em>网络</em>操作系统，<em>网络</em>管理软件及<em>网络</em>通信协议的管理和协调下，实现资源共享和信息传递的计算机系统
<em>网络编程</em>
·在通信协议下，实现<em>网络</em>互连的不同计算机上运行的程序间可以进行数据交换
<em>网络编程</em>三要素
IP地址
·要想让<em>网络</em>中的计算机能够互相通信，必须为每台计算机指定一个标识号，通过这个标识号来指定
要接收数据的计算机和识别发送的计算机，而IP地址就是这个标识号。也就是设备的标识
端口
·<em>网络</em>的通信，本质是两</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_66813230/article/details/123669199" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-9-123669199-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_66813230/article/details/123669199&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_66813230/article/details/123669199" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-9-123669199-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_66813230/article/details/123669199&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=10">
					<div class="left ellipsis-online ellipsis-online-1"><em>Java</em><em>网络编程</em><em>基础</em>知识</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_66813230" target="_blank" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=10"><span class="blog-title">weixin_66813230的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">03-23</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					414
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_66813230/article/details/123669199" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.9&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-9-123669199-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;9&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_66813230/article/details/123669199&quot;}" data-report-query="spm=1001.2101.3001.6650.9&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-9-123669199-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=10">
				<div class="desc ellipsis-online ellipsis-online-1">一、<em>网络</em>通信三要素

IP地址：设备在<em>网络</em>中的地址，是唯一的标识
	端口号：应用程序在设备中唯一的标识
	协议：数据在<em>网络</em>中传输的规则，常见的协议有UDP协议和TCP协议
1 IP地址

IP（Internet Protocol）：全称”互联网协议地址”，是分配给上网设备的唯一标志。
	​​​常见分类：IPv4和IPv6




IP地址形式：

公网地址和私有地址（局域网使用）
	192.168.开头就是常见的局域网地址，范围为192.168.0.0~192.168.255.255，专门为组织机构内部使.</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_42682925/27497288" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-10-27497288-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_42682925/27497288&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_42682925/27497288" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-10-27497288-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_42682925/27497288&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-10-27497288-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-10-27497288-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=11">
					<div class="left ellipsis-online ellipsis-online-1">Burp抓包使用<em>详解</em>_Burp!_游戏_</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">10-03</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_42682925/27497288" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.10&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-10-27497288-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;10&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_42682925/27497288&quot;}" data-report-query="spm=1001.2101.3001.6650.10&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-10-27497288-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-10-27497288-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=11">
				<div class="desc ellipsis-online ellipsis-online-1">自己测试，自己做服务器，正在找代码，用于娱乐</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38619967/13036305" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-11-13036305-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38619967/13036305&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38619967/13036305" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-11-13036305-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38619967/13036305&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-11-13036305-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-11-13036305-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=12">
					<div class="left ellipsis-online ellipsis-online-1"><em>java</em>script操作符"!~"<em>详解</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">10-24</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38619967/13036305" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.11&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-11-13036305-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;11&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38619967/13036305&quot;}" data-report-query="spm=1001.2101.3001.6650.11&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-11-13036305-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-11-13036305-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=12">
				<div class="desc ellipsis-online ellipsis-online-1">主要详细介绍了<em>java</em>script操作符"!~"，最基本也最容易忽略的东西，混了几年连基本都没了，被人问到得贻笑大方。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/qq_17109217/7576353" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-12-7576353-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/qq_17109217/7576353&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/qq_17109217/7576353" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-12-7576353-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/qq_17109217/7576353&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-12-7576353-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-12-7576353-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=13">
					<div class="left ellipsis-online ellipsis-online-1">L3信令<em>详解</em>！！经典</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">07-01</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/qq_17109217/7576353" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.12&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-12-7576353-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;12&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/qq_17109217/7576353&quot;}" data-report-query="spm=1001.2101.3001.6650.12&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-12-7576353-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-12-7576353-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=13">
				<div class="desc ellipsis-online ellipsis-online-1">L3信令<em>详解</em>！！经典WCDMA层3信令~很全</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_download clearfix" data-url="https://download.csdn.net/download/weixin_38605144/14813363" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-13-14813363-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38605144/14813363&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://download.csdn.net/download/weixin_38605144/14813363" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-13-14813363-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38605144/14813363&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-13-14813363-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-13-14813363-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=14">
					<div class="left ellipsis-online ellipsis-online-1">10nm的威力！ ARM全新Cortex-A73构架<em>详解</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">01-19</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://download.csdn.net/download/weixin_38605144/14813363" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.13&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-download-2~default~OPENSEARCH~Rate-13-14813363-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;13&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Rate&quot;,&quot;dest&quot;:&quot;https://download.csdn.net/download/weixin_38605144/14813363&quot;}" data-report-query="spm=1001.2101.3001.6650.13&amp;utm_medium=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-13-14813363-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-download-2%7Edefault%7EOPENSEARCH%7ERate-13-14813363-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=14">
				<div class="desc ellipsis-online ellipsis-online-1">智能手机在2009年之后的七年中性能增强了100...如虚拟现实、<em>超</em>高清可视化，基于音频处理和计算机级视频处理对智能手机的性能要求变得越来越高。近几年智能手机越来越轻薄，很大程度上限制了机身散热和电池及电源管理电</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/weixin_42624898/article/details/117785283" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-14-117785283-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_42624898/article/details/117785283&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/weixin_42624898/article/details/117785283" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-14-117785283-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_42624898/article/details/117785283&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=15">
					<div class="left ellipsis-online ellipsis-online-1"><em>网络协议</em> TCP\UDP、Socket 编程、<em>Java</em> 怎么处理 URL？（<em>Java</em> 从自学到就业 第17天）</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/weixin_42624898" target="_blank" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=15"><span class="blog-title">学Java的小前端的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">06-11</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					1133
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/weixin_42624898/article/details/117785283" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.14&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-14-117785283-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;14&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/weixin_42624898/article/details/117785283&quot;}" data-report-query="spm=1001.2101.3001.6650.14&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-14-117785283-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=15">
				<div class="desc ellipsis-online ellipsis-online-1"><em>Java</em> 学习记录 第十七天

由于本渣渣是前端转行<em>Java</em>，所以编辑器的选择就直接用 webstorm 同公司的 idea
接下来的知识梳理有一部分会借鉴大佬 廖雪峰的博客

学习目标
 了解 TCP \ UDP <em>网络协议</em>，掌握Socket类、ServerSocket 类、InetAddress 类

学习内容

TCP \ UDP 的区别
简述 Socket 编程
记录 ServerSocket 类的方法
Socket 类的方法
InetAddress 类的方法
编写简易的服务端服务与客户端服务
URL</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/ashfiqa/article/details/122253751" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-15-122253751-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/ashfiqa/article/details/122253751&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/ashfiqa/article/details/122253751" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-15-122253751-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/ashfiqa/article/details/122253751&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=16">
					<div class="left ellipsis-online ellipsis-online-1"><em>JAVA</em> <em>网络编程</em></div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/ashfiqa" target="_blank" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=16"><span class="blog-title">ashfiqa的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">01-01</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					6450
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/ashfiqa/article/details/122253751" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.15&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-15-122253751-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;15&quot;,&quot;strategy&quot;:&quot;2~default~CTRLIST~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/ashfiqa/article/details/122253751&quot;}" data-report-query="spm=1001.2101.3001.6650.15&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7ECTRLIST%7ERate-15-122253751-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=16">
				<div class="desc ellipsis-online ellipsis-online-1">计算机<em>网络</em>是通过传输介质、通信设施和<em>网络</em>通信协议，把分散在不同地点的计算机设备互连起来的，实现资源共享和数据传输的系统。<em>网络编程</em>就是编写程序使互联网的两个（或多个）设备（如计算机）之间进行数据传输。<em>Java</em>语言对<em>网络编程</em>提供了良好的支持。通过其提供的接口我们可以很方便地进行<em>网络编程</em>。<em>网络</em>通信协议是<em>网络编程</em>中的关键，通信双方达成的一种共识，当通信双方都遵守这样的约定，才能正确传输信息。</div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_blog clearfix" data-url="https://blog.csdn.net/qq_54353206/article/details/127195984" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-16-127195984-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_54353206/article/details/127195984&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://blog.csdn.net/qq_54353206/article/details/127195984" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-16-127195984-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_54353206/article/details/127195984&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=17">
					<div class="left ellipsis-online ellipsis-online-1"><em>网络编程</em><em>java</em>(知识总结加示例)</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info">
					<a href="https://blog.csdn.net/qq_54353206" target="_blank" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=17"><span class="blog-title">qq_54353206的博客</span></a>
				</div>
				<div class="info display-flex">
					<span class="info-block time">10-07</span>
					<span class="info-block read"><img class="read-img" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					146
					</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://blog.csdn.net/qq_54353206/article/details/127195984" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.16&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-16-127195984-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;16&quot;,&quot;strategy&quot;:&quot;2~default~BlogCommendFromBaidu~Rate&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_54353206/article/details/127195984&quot;}" data-report-query="spm=1001.2101.3001.6650.16&amp;utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromBaidu%7ERate-16-127195984-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=17">
				<div class="desc ellipsis-online ellipsis-online-1"><em>网络</em><em>基础</em>、TCP/IP加UDP入门<em>详解</em></div>
			</a>
		</div>
	</div>
</div>
<div class="recommend-item-box type_chatgpt clearfix" data-url="https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf" data-report-view="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-chatgpt-2~default~OPENSEARCH~Position-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Position&quot;,&quot;dest&quot;:&quot;https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf&quot;}">
	<div class="content-box">
		<div class="content-blog display-flex">
			<div class="title-box">
				<a href="https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf" class="tit" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-chatgpt-2~default~OPENSEARCH~Position-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Position&quot;,&quot;dest&quot;:&quot;https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-chatgpt-2%7Edefault%7EOPENSEARCH%7EPosition-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-chatgpt-2%7Edefault%7EOPENSEARCH%7EPosition-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=18">
					<div class="left ellipsis-online ellipsis-online-1">spark streaming架构原理<em>详解</em>！</div>
					<div class="tag">最新发布</div>
				</a>
			</div>
			<div class="info-box display-flex">
				<div class="info display-flex">
					<span class="info-block">06-01</span>
				</div>
			</div>
		</div>
		<div class="desc-box">
			<a href="https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf" target="_blank" data-report-click="{&quot;ab&quot;:&quot;new&quot;,&quot;spm&quot;:&quot;1001.2101.3001.6650.17&quot;,&quot;mod&quot;:&quot;popu_387&quot;,&quot;extra&quot;:&quot;{\&quot;highlightScore\&quot;:0.0,\&quot;utm_medium\&quot;:\&quot;distribute.pc_relevant.none-task-chatgpt-2~default~OPENSEARCH~Position-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235^v38^pc_relevant_anti_t3\&quot;,\&quot;dist_request_id\&quot;:\&quot;1686562737647_56793\&quot;}&quot;,&quot;dist_request_id&quot;:&quot;1686562737647_56793&quot;,&quot;ab_strategy&quot;:&quot;increase_t0_download_v2&quot;,&quot;index&quot;:&quot;17&quot;,&quot;strategy&quot;:&quot;2~default~OPENSEARCH~Position&quot;,&quot;dest&quot;:&quot;https://wenku.csdn.net/answer/40091995865c4d2d34d169d6e7cf4eaf&quot;}" data-report-query="spm=1001.2101.3001.6650.17&amp;utm_medium=distribute.pc_relevant.none-task-chatgpt-2%7Edefault%7EOPENSEARCH%7EPosition-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;depth_1-utm_source=distribute.pc_relevant.none-task-chatgpt-2%7Edefault%7EOPENSEARCH%7EPosition-17-40091995865c4d2d34d169d6e7cf4eaf-blog-127169869.235%5Ev38%5Epc_relevant_anti_t3&amp;utm_relevant_index=18">
				<div class="desc ellipsis-online ellipsis-online-1">### 回答1：
Spark Streaming是基于Spark核心引擎的流处理框架，它将实时数据流分成小批次进行处理，每个批次都可以像RDD一样进行处理。Spark Streaming的架构原理主要包括以下几个方面：

1. 数据源：Spark Streaming支持多种数据源，包括Kafka、Flume、Twitter、HDFS等，用户可以根据自己的需求选择合适的数据源。

2. 数据接收器：Spark Streaming通过数据接收器从数据源中获取数据，并将数据分成小批次进行处理。数据接收器可以是Spark自带的接收器，也可以是自定义的接收器。

3. 数据处理：Spark Streaming将每个批次的数据转换成RDD，然后通过Spark的转换操作进行处理。用户可以使用Spark提供的各种转换操作，如map、filter、reduce等。

4. 数据输出：Spark Streaming支持多种数据输出方式，包括HDFS、数据库、Kafka等。用户可以根据自己的需求选择合适的输出方式。

5. 容错性：Spark Streaming具有高度的容错性，它可以在节点故障或数据丢失的情况下自动恢复，并保证数据处理的准确性和完整性。

总之，Spark Streaming的架构原理是基于Spark核心引擎的流处理框架，它通过数据源、数据接收器、数据处理和数据输出等组件实现实时数据流的处理和分析。   

### 回答2：
Spark Streaming是Spark的一种实时数据处理框架，它可以在Spark的强大计算引擎上，实现对实时数据流的高效处理和分析。Spark Streaming的架构原理包括以下几个部分：

1. 数据输入层：Spark Streaming的数据输入来源可以是各种数据源，例如Kafka、Flume、HDFS、socket等。在Spark Streaming中，输入的数据流被称为DStream（Discretized Stream），它是一系列连续的RDD（Resilient Distributed Datasets）。

2. 数据处理层：DStream作为Spark Streaming的基本数据结构，可以使用Spark强大的RDD操作函数进行处理。例如map、reduce、join等。Spark Streaming支持的RDD操作函数都可以被应用到DStream上，因此可以实现强大和灵活的数据处理和分析。

3. 数据输出层：在数据处理完成后，Spark Streaming提供了多种数据输出方式，例如将数据存储在HDFS、将数据发送到Kafka或Flume等消息系统、将数据推送到Web UI或Dashboards等。用户可以根据自己的需求选择合适的输出方式。

4. 容错性和可伸缩性：Spark Streaming具有良好的容错性和可伸缩性，它可以在集群中进行分布式计算和分布式存储，并保证数据计算和处理的完整性。

总的来说，Spark Streaming的架构原理基于Spark强大的计算和分布式处理引擎，实现了对实时数据流的高效处理和分析。以应对大数据时代对实时业务处理和分析的需求。   

### 回答3：
Spark Streaming架构原理是基于Spark的批处理引擎和Spark执行引擎<em>基础</em>上，实现了流式处理。其原理是将连续不断的数据流按照一定的时间间隔划分成批处理的数据流，将批数据流转化为RDD，再通过Spark执行引擎进行处理计算。

Spark Streaming架构包含以下组件：

1.数据输入源：包括数据输入流的来源，如Kafka、Flume、HDFS、Socket等。

2.输入DStream：对输入数据流进行封装，存储在内存中，以RDD形式进行处理。

3.数据处理引擎：处理包括数据转换、过滤、聚合等操作，使用Spark的高度并行化和内存计算能力。

4.处理结果输出：将处理结果输出到外部存储系统，如HDFS、数据库等。

在Spark Streaming的具体实现过程中，有以下三个重要的概念：

1.数据流窗口：指的是对输入的数据按照一定的时间间隔进行划分，把一段时间内的数据封装成一个小的包进行处理。可以设置窗口的大小和滑动间隔。

2.离散化流：将输入的数据流通过DStream划分成一系列的离散化的RDD，每个RDD包含窗口中一段时间内的数据。

3.转换操作：对离散化流中每个RDD进行转换操作，包括map、filter、reduce、join等操作，完成对数据流的处理。

在使用Spark Streaming架构进行数据流处理的时候，需要注意以下几点：

1.数据处理设计应该具备时效性和高可用性，尽可能减少延迟时间。

2.需要合理设置RDD缓存机制，避免数据丢失。

3.考虑到复杂的计算可能会使内存存储溢出，需要合理设置批处理的大小。

总的来说，Spark Streaming架构是一种基于Spark的流式数据处理框架。其实现原理是通过将流式数据划分为小的批处理进行离散化和转换，再结合Spark的高并发执行引擎实现对数据流的高速、时效性处理。</div>
			</a>
		</div>
	</div>
</div>
              </div>
<div id="recommendNps" class="recommend-nps-box common-nps-box" style="display: block;">
  <h3 class="aside-title">“相关推荐”对你有帮助么？</h3>
  <div class="aside-content">
      <ul class="newnps-list">
          <li class="newnps-item" data-type="非常没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel1.png" alt="">
                  <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey1.png" alt="">
              </div>
              <div class="newnps-text">非常没帮助</div>
          </li>
          <li class="newnps-item" data-type="没帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel2.png" alt="">
                  <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey2.png" alt="">
              </div>
              <div class="newnps-text">没帮助</div>
          </li>
          <li class="newnps-item" data-type="一般">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel3.png" alt="">
                  <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey3.png" alt="">
              </div>
              <div class="newnps-text">一般</div>
          </li>
          <li class="newnps-item" data-type="有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel4.png" alt="">
                  <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey4.png" alt="">
              </div>
              <div class="newnps-text">有帮助</div>
          </li>
          <li class="newnps-item" data-type="非常有帮助">
              <div class="newnps-img-box">
                  <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel5.png" alt="">
                  <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey5.png" alt="">
              </div>
              <div class="newnps-text">非常有帮助</div>
          </li>
      </ul>
      <div class="newnps-form-box">
      <div class="newnps-form">
          <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
          <span class="newnps-btn">提交</span>
      </div>
      </div>
  </div>
</div><div class="blog-footer-bottom" style="margin-top:10px;">
        <div id="copyright-box" class="">
          <div id="csdn-copyright-footer" class="column small">
            <ul class="footer-column-t">
            <li>
              <a href="https://www.csdn.net/company/index.html#about" target="_blank">关于我们</a>
            </li>
            <li>
              <a href="https://www.csdn.net/company/index.html#recruit" target="_blank">招贤纳士</a>
            </li>
            <li><a href="https://marketing.csdn.net/questions/Q2202181741262323995" target="_blank">商务合作</a></li>
            <li><a href="https://marketing.csdn.net/questions/Q2202181748074189855" target="_blank">寻求报道</a></li>
            <li>
              <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/tel.png" alt="">
              <span>400-660-0108</span>
            </li>
            <li>
              <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/email.png" alt="">
              <a href="mailto:webmaster@csdn.net" target="_blank">kefu@csdn.net</a>
            </li>
            <li>
              <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/cs.png" alt="">
              <a href="https://csdn.s2.udesk.cn/im_client/?web_plugin_id=29181" target="_blank">在线客服</a>
            </li>
            <li>
              工作时间&nbsp;8:30-22:00
            </li>
          </ul>
            <ul class="footer-column-b">
            <li><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/badge.png" alt=""><a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010502030143" rel="noreferrer" target="_blank">公安备案号11010502030143</a></li>
            <li><a href="http://beian.miit.gov.cn/publish/query/indexFirst.action" rel="noreferrer" target="_blank">京ICP备19004658号</a></li>
            <li><a href="https://csdnimg.cn/release/live_fe/culture_license.png" rel="noreferrer" target="_blank">京网文〔2020〕1039-165号</a></li>
            <li><a href="https://csdnimg.cn/cdn/content-toolbar/csdn-ICP.png" target="_blank">经营性网站备案信息</a></li>
            <li><a href="http://www.bjjubao.org/" target="_blank">北京互联网违法和不良信息举报中心</a></li>
            <li><a href="https://download.csdn.net/tutelage/home" target="_blank">家长监护</a></li>
            <li><a href="http://www.cyberpolice.cn/" target="_blank">网络110报警服务</a></li>
            <li><a href="http://www.12377.cn/" target="_blank">中国互联网举报中心</a></li>
            <li><a href="https://chrome.google.com/webstore/detail/csdn%E5%BC%80%E5%8F%91%E8%80%85%E5%8A%A9%E6%89%8B/kfkdboecolemdjodhmhmcibjocfopejo?hl=zh-CN" target="_blank">Chrome商店下载</a></li>
            <li><a href="https://blog.csdn.net/blogdevteam/article/details/126135357" target="_blank">账号管理规范</a></li>
            <li><a href="https://www.csdn.net/company/index.html#statement" target="_blank">版权与免责声明</a></li>
            <li><a href="https://blog.csdn.net/blogdevteam/article/details/90369522" target="_blank">版权申诉</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20220705052819.png" target="_blank">出版物许可证</a></li>
            <li><a href="https://img-home.csdnimg.cn/images/20210414021142.jpg" target="_blank">营业执照</a></li>
            <li>©1999-2023北京创新乐知网络技术有限公司</li>
          </ul>
          </div>
        </div>
      </div>
<script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-footer.js.下载" data-isfootertrack="false" type="text/javascript"></script>
<script type="text/javascript">
    window.csdn.csdnFooter.options = {
        el: '.blog-footer-bottom',
        type: 2
    }
</script>          </main>
<aside class="blog_container_aside" style="position: fixed; bottom: 0px; z-index: 99; left: 36.3333px; width: 300px; top: auto;">
<div id="asideProfile" class="aside-box">
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/qq_52519008" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4121&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008&quot;,&quot;ab&quot;:&quot;new&quot;}">
                <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bb2a03d43ed44186a8a4af512629451c_qq_52519008.jpg!1" class="avatar_pic">
            </a>
        </div>
        <div class="user-info d-flex flex-column profile-intro-name-box">
            <div class="profile-intro-name-boxTop">
                <a href="https://blog.csdn.net/qq_52519008" target="_blank" class="" id="uid" title="酱紫学Java" data-report-click="{&quot;mod&quot;:&quot;popu_379&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4122&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <span class="name " username="qq_52519008">酱紫学Java</span>
                </a>
                <span>
                </span>
                <span class="flag expert-blog">
                <span class="bubble">CSDN认证博客专家</span>
                </span>
                <span class="flag company-blog">
                <span class="bubble">CSDN认证企业博客</span>
                </span>
            </div>
            <div class="profile-intro-name-boxFooter">
                <span class="personal-home-page personal-home-years" title="已加入 CSDN 3年">码龄3年</span>
                    <span class="personal-home-page">
                    <a class="personal-home-certification" href="https://i.csdn.net/#/uc/profile?utm_source=14998968" target="_blank" title="高校学生">
                    <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/colleges.png" alt="">
                    高校学生
                    </a>
                    </span>
            </div>
        </div>
    </div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="47">
            <a href="https://blog.csdn.net/qq_52519008" data-report-click="{&quot;mod&quot;:&quot;1598321000_001&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4310&quot;}" data-report-query="t=1">  
                <dt><span class="count">47</span></dt>
                <dd class="font">原创</dd>
            </a>
        </dl>
        <dl class="text-center" data-report-click="{&quot;mod&quot;:&quot;1598321000_002&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4311&quot;}" title="376057">
            <a href="https://blog.csdn.net/rank/list/weekly" target="_blank">
                <dt><span class="count">37万+</span></dt>
                <dd class="font">周排名</dd>
            </a>
        </dl>
        <dl class="text-center" title="149984">
            <a href="https://blog.csdn.net/rank/list/total" data-report-click="{&quot;mod&quot;:&quot;1598321000_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4312&quot;}" target="_blank">
                <dt><span class="count">14万+</span></dt>
                <dd class="font">总排名</dd>
            </a>
        </dl>
        <dl class="text-center" style="min-width:58px" title="53106">  
            <dt><span class="count">5万+</span></dt>
            <dd>访问</dd>
        </dl>
        <dl class="text-center" title="3级,点击查看等级说明">
            <dt><a href="https://blog.csdn.net/blogdevteam/article/details/103478461" target="_blank">
                <img class="level" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/blog3.png">
            </a>
            </dt>
            <dd>等级</dd>
        </dl>
    </div>
    <div class="item-rank"></div>
    <div class="data-info d-flex item-tiling">
        <dl class="text-center" title="680">
            <dt><span class="count">680</span></dt>
            <dd>积分</dd>
        </dl>
         <dl class="text-center" id="fanBox" title="136">
            <dt><span class="count" id="fan">136</span></dt>
            <dd>粉丝</dd>
        </dl>
        <dl class="text-center" title="149">
            <dt><span class="count">149</span></dt>
            <dd>获赞</dd>
        </dl>
        <dl class="text-center" title="36">
            <dt><span class="count">36</span></dt>
            <dd>评论</dd>
        </dl>
        <dl class="text-center" title="292">
            <dt><span class="count">292</span></dt>
            <dd>收藏</dd>
        </dl>
    </div>
    <div class="aside-box-footer">
        <div class="badge-box d-flex">
            <div class="badge d-flex">
                <div class="icon-badge" title="习惯养成">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/xiguanyangchengLv1.png" alt="习惯养成">
                    </div>
                </div>
                <div class="icon-badge" title="新秀勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/xinxiu@240.png" alt="新秀勋章">
                    </div>
                </div>
                <div class="icon-badge" title="国庆勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/46719b7f416940a38051072f841c67c0.png" alt="国庆勋章">
                    </div>
                </div>
                <div class="icon-badge" title="持续创作">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/chizhiyiheng@240.png" alt="持续创作">
                    </div>
                </div>
                <div class="icon-badge" title="笔耕不辍">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/70592b2299594e37aedcaa91fc52a294.png" alt="笔耕不辍">
                    </div>
                </div>
                <div class="icon-badge" title="创作能手">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/qixiebiaobing4@240.png" alt="创作能手">
                    </div>
                </div>
                <div class="icon-badge" title="新人勋章">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/blinknewcomer@240.png" alt="新人勋章">
                    </div>
                </div>
                <div class="icon-badge" title="知无不言">
                    <div class="mouse-box">
                        <img class="medal-img" data-report-click="{&quot;spm&quot;:&quot;3001.4296&quot;}" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f19b84c244aa4e6d8bf469b4aff1f98c.png" alt="知无不言">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="profile-intro-name-boxOpration">
        <div class="opt-letter-watch-box">
        <a class="bt-button personal-letter" href="https://im.csdn.net/chat/qq_52519008" target="_blank" rel="noopener">私信</a>
        </div>
        <div class="opt-letter-watch-box"> 
            <a class="personal-watch bt-button" id="btnAttent">关注</a>  
        </div>
    </div>
</div>
 <div id="asideSearchArticle" class="aside-box">
	<div class="aside-content search-comter">
    <div class="aside-search aside-search-blog">         
        <input type="text" class="input-serch-blog" name="" autocomplete="off" value="" id="search-blog-words" placeholder="搜博主文章">
        <a class="btn-search-blog" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.9182&quot;}">
                    <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-sou.png">
        </a>
    </div>
    </div>
</div>


<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list">
			<li>
				<a href="https://blog.csdn.net/qq_52519008/article/details/124786234" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/124786234&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Java基础——String类
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">9175</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_52519008/article/details/124654579" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/124654579&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Java基础——Arrays类
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">4861</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_52519008/article/details/124094475" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/124094475&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Java基础语法——Java语言介绍
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">4220</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_52519008/article/details/127165564" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127165564&quot;,&quot;ab&quot;:&quot;new&quot;}">
				Java基础——多线程详解！！！！
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">3039</span>
                </a>
			</li>
			<li>
				<a href="https://blog.csdn.net/qq_52519008/article/details/127143225" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_541&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4139&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127143225&quot;,&quot;ab&quot;:&quot;new&quot;}">
				JDBC中使用Properties类及配置文件的操作
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/readCountWhite.png" alt="">
					<span class="read">3029</span>
                </a>
			</li>
		</ul>
	</div>
</div>
<div id="asideCategory" class="aside-box ">
    <h3 class="aside-title">分类专栏</h3>
    <div class="aside-content">
        <ul>
            <li>
                <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/qq_52519008/category_12042889.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/category_12042889.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                    <div class="special-column-bar "></div>
                    <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                    <span class="title oneline">
                        Java基础入门
                    </span>
                </a>
                <span class="special-column-num">22篇</span>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_52519008/article/details/124652503#comments_26984126" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/124652503#comments_26984126&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础语法——循环结构</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/m0_60719136" class="user-name" target="_blank">雷神爱吃三菜团子: </a>
                    <span class="code-comments">http://t.csdn.cn/KLppA</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_52519008/article/details/127287779#comments_26761334" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127287779#comments_26761334&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础——泛型详解！！！！！！</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/community_717" class="user-name" target="_blank">CSDN-Ada助手: </a>
                    <span class="code-comments">非常感谢博主的辛勤创作，这篇博客真的很棒！对于Java泛型的讲解非常详细，让我这个刚开始学习Java的小白也能够很好地理解。希望博主能够继续分享更多实用的知识和经验，让我们一起努力学习，共同进步。再次感谢博主！
为了方便博主创作，提高生产力，CSDN上线了AI写作助手功能，就在创作编辑器右侧哦～（https://mp.csdn.net/edit?utm_source=blog_comment_recall ）诚邀您来加入测评，到此（https://activity.csdn.net/creatActivity?id=10450&amp;utm_source=blog_comment_recall）发布测评文章即可获得「话题勋章」，同时还有机会拿定制奖牌。</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_52519008/article/details/127154696#comments_25491858" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127154696#comments_25491858&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础——匿名内部类</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_52519008" class="user-name" target="_blank">酱紫学Java: </a>
                    <span class="code-comments">匿名内部类是没有构造方法的</span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_52519008/article/details/127154696#comments_25485881" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127154696#comments_25485881&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础——匿名内部类</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/m0_51253102" class="user-name" target="_blank">骆驼祥子之分子: </a>
                    <span class="code-comments">本人初学java，学到这里有个疑问。就是作者你写的匿名类模板那里都是重写方法的。我的问题是匿名类既然是个类，在模板那里添加属性值啊，构造函数，getset函数这些，我试过了不能调用出来。因为我理解这个匿名类跟继承类是差不多的，所以在匿名类中为啥不能再添加这些类的属性啊<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/025.png" alt="表情包"></span>
                </p>
            </li>
            <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/qq_52519008/article/details/124094475#comments_25475302" data-report-click="{&quot;mod&quot;:&quot;popu_542&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4231&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/124094475#comments_25475302&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础语法——Java语言介绍</a>
                <p class="comment ellipsis">
                    <a href="https://blog.csdn.net/qq_52519008" class="user-name" target="_blank">酱紫学Java: </a>
                    <span class="code-comments">我看的是Java核心技术卷 但是这本书对于才学这门语言的同学有难度 我建议是先跟着B站视频学习 黑马或者狂神说的都讲的很不错 后续如果想深入再买书 最重要的是一定要多敲代码</span>
                </p>
            </li>
        </ul>
    </div>
</div>
<div id="asideNewNps" class="aside-box common-nps-box" style="display: block;">
    <h3 class="aside-title">您愿意向朋友推荐“博客详情页”吗？</h3>
    <div class="aside-content">
        <ul class="newnps-list">
            <li class="newnps-item" data-type="强烈不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel1.png" alt="">
                    <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey1.png" alt="">
                </div>
                <div class="newnps-text">强烈不推荐</div>
            </li>
            <li class="newnps-item" data-type="不推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel2.png" alt="">
                    <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey2.png" alt="">
                </div>
                <div class="newnps-text">不推荐</div>
            </li>
            <li class="newnps-item" data-type="一般般">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel3.png" alt="">
                    <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey3.png" alt="">
                </div>
                <div class="newnps-text">一般般</div>
            </li>
            <li class="newnps-item" data-type="推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel4.png" alt="">
                    <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey4.png" alt="">
                </div>
                <div class="newnps-text">推荐</div>
            </li>
            <li class="newnps-item" data-type="强烈推荐">
                <div class="newnps-img-box">
                    <img class="newnps-img active" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeel5.png" alt="">
                    <img class="newnps-img default" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/npsFeelGrey5.png" alt="">
                </div>
                <div class="newnps-text">强烈推荐</div>
            </li>
        </ul>
        <div class="newnps-form-box">
        <div class="newnps-form">
            <input type="text" placeholder="请输入建议或反馈后点击提交" class="newnps-input">
            <span class="newnps-btn">提交</span>
        </div>
        </div>
    </div>
</div>
<div id="asideArchive" class="aside-box" style="display:block!important; width:300px;">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix">
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_52519008/article/details/127287779" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127287779&quot;,&quot;ab&quot;:&quot;new&quot;}">Java基础——泛型详解！！！！！！</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_52519008/article/details/127248791" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127248791&quot;,&quot;ab&quot;:&quot;new&quot;}">Java进阶——JSON格式了解</a>
            </li>
            <li class="clearfix">
            <a href="https://blog.csdn.net/qq_52519008/article/details/127217860" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_382&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4136&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/article/details/127217860&quot;,&quot;ab&quot;:&quot;new&quot;}">SpringAOP超详解！！！！</a>
            </li>
        </ul>
        <div class="archive-bar"></div>
        <div class="archive-box">
                <div class="archive-list-item"><a href="https://blog.csdn.net/qq_52519008?type=blog&amp;year=2022&amp;month=10" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008?type=blog&amp;year=2022&amp;month=10&quot;}"><span class="year">2022年</span><span class="num">44篇</span></a></div>
                <div class="archive-list-item"><a href="https://blog.csdn.net/qq_52519008?type=blog&amp;year=2021&amp;month=12" target="_blank" data-report-click="{&quot;mod&quot;:&quot;popu_538&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4138&quot;,&quot;ab&quot;:&quot;new&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008?type=blog&amp;year=2021&amp;month=12&quot;}"><span class="year">2021年</span><span class="num">3篇</span></a></div>
        </div>
    </div>
</div>
	<div id="footerRightAds" class="isShowFooterAds">
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57"><script async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(7).txt" crossorigin="anonymous" data-checked-head="true"></script>
<!-- PC-博客-详情页-左下视窗-50-99 -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-1076724771190722" data-ad-slot="7418711749" data-ad-format="auto" data-full-width-responsive="true" data-adsbygoogle-status="done"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=57&amp;adId=1031240&amp;adBlockFlag=0&amp;a=1031240&amp;c=0&amp;k=Java基础——网络编程全网超详解！！！！！！！&amp;spm=1001.2101.3001.5001&amp;articleId=127169869&amp;d=1&amp;t=3&amp;u=b5eb9e3e3edf4f93bbb970f637558145" style="display: block;width: 0px;height: 0px;"></div>
		</div>
	</div>
    <!-- 详情页显示目录 -->
<!--文章目录-->
<div id="asidedirectory" class="aside-box">
    <div class="groupfile" id="directory">
        <h3 class="aside-title">目录</h3>
        <div class="align-items-stretch group_item">
            <div class="pos-box">
            <div class="scroll-box">
                <div class="toc-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t0">文章目录</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t1">一、网络编程基本概念</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t2">1、网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t3">2、计算机网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t4">3、通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t5">4、通信接口</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t6">二、网络分层</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t7">三、网络编程三要素</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t8">1、IP地址：InetAddress</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t9">2、端口</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t10">3、协议</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t11">3.1、网络通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t12">3.2、TCP/IP协议簇</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t13">3.3、TCP 和 UDP</a></li></ol></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t14">四. TCP通信程序</a></li><li class="sub-box"><ol><li class="active"><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t15">1、TCP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t16">2、TCP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t17">五. UDP通信程序</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t18">1、 UDP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t19">2、三个概念：数据包(Packet)、数据报(Datagram)和套接字(Socket)</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t20">2.1、数据报(Datagram)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t21">2.2、套接字(Socket)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t22">2.3、数据包(Packet)</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t23">3、 UDP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t24">六、URL编程</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t25">1、URL类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t26">2、针对HTTP协议的URLConnection类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t27">3、URL下载网络资源</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t28">七、小结</a></li></ol></div>
            </div>
            </div>
        </div>
    </div>
</div>
</aside>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).parents("p.text-center").remove();
	})
</script>
<script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-tooltip.js.下载"></script>
<script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-medal.js.下载"></script>        </div>
<div class="recommend-right align-items-stretch clearfix" id="rightAside" data-type="recommend" style="height: auto !important;">
    <aside class="recommend-right_aside" style="height: auto !important;">
        <div id="recommend-right" style="position: fixed; top: 56px;">
                                <div class="programmer1Box">
                        <div id="kp_box_530" data-pid="530"><script async="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/f(7).txt" crossorigin="anonymous" data-checked-head="true"></script>
<!-- PC-博客-详情页-右上视窗-50-99 -->
<ins class="adsbygoogle" style="display: block; height: 600px;" data-ad-client="ca-pub-1076724771190722" data-ad-slot="1041005650" data-ad-format="auto" data-full-width-responsive="true" data-adsbygoogle-status="done" data-ad-status="filled"><div id="aswift_1_host" style="border: none; height: 600px; width: 300px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block; overflow: visible;" tabindex="0" title="Advertisement" aria-label="Advertisement"><iframe id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;border:0;width:300px;height:600px;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" width="300" height="600" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/ads.html" data-google-container-id="a!2" data-google-query-id="CMebuOe3vf8CFUhfDwIdhigJsA" data-load-complete="true"></iframe></div></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script><img class="pre-img-lasy" data-src="https://kunyu.csdn.net/1.png?p=530&amp;adId=1031239&amp;adBlockFlag=0&amp;a=1031239&amp;c=0&amp;k=Java基础——网络编程全网超详解！！！！！！！&amp;spm=1001.2101.3001.4647&amp;articleId=127169869&amp;d=1&amp;t=3&amp;u=91c73f5424614264af97868156a11c1a" style="display: block;width: 0px;height: 0px;" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/1.png"></div>
                    </div>
            <div class="flex-column aside-box groupfile" id="groupfile" style="display: block; max-height: 458px;">
                <div class="groupfile-div" style="max-height: 458px;">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t0">文章目录</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t1">一、网络编程基本概念</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t2">1、网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t3">2、计算机网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t4">3、通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t5">4、通信接口</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t6">二、网络分层</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t7">三、网络编程三要素</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t8">1、IP地址：InetAddress</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t9">2、端口</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t10">3、协议</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t11">3.1、网络通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t12">3.2、TCP/IP协议簇</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t13">3.3、TCP 和 UDP</a></li></ol></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t14">四. TCP通信程序</a></li><li class="sub-box"><ol><li class="active"><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t15">1、TCP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t16">2、TCP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t17">五. UDP通信程序</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t18">1、 UDP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t19">2、三个概念：数据包(Packet)、数据报(Datagram)和套接字(Socket)</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t20">2.1、数据报(Datagram)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t21">2.2、套接字(Socket)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t22">2.3、数据包(Packet)</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t23">3、 UDP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t24">六、URL编程</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t25">1、URL类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t26">2、针对HTTP协议的URLConnection类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t27">3、URL下载网络资源</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t28">七、小结</a></li></ol></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
            <div class="aside-box kind_person d-flex flex-column">
                    <h3 class="aside-title">分类专栏</h3>
                    <div class="align-items-stretch kindof_item" id="kind_person_column">
                        <div class="aside-content">
                            <ul>
                                <li>
                                    <a class="clearfix special-column-name" target="_blank" href="https://blog.csdn.net/qq_52519008/category_12042889.html" data-report-click="{&quot;mod&quot;:&quot;popu_537&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4137&quot;,&quot;strategy&quot;:&quot;pc付费专栏左侧入口&quot;,&quot;dest&quot;:&quot;https://blog.csdn.net/qq_52519008/category_12042889.html&quot;,&quot;ab&quot;:&quot;new&quot;}">
                                        <div class="special-column-bar "></div>
                                        <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/20201014180756928.png" alt="" onerror="this.src=&#39;https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64&#39;">
                                        <span class="">
                                            Java基础入门
                                        </span>
                                    </a>
                                    <span class="special-column-num">22篇</span>
                                </li>
                            </ul>
                        </div>
                    </div>
            </div>
        </div>
    </aside>
</div>

<div class="recommend-right1  align-items-stretch clearfix" id="rightAsideConcision" data-type="recommend">
    <aside class="recommend-right_aside">
        <div id="recommend-right-concision" style="position: fixed; top: 56px;">
            <div class="flex-column aside-box groupfile" id="groupfileConcision">
                <div class="groupfile-div1" style="max-height: 868px;">
                <h3 class="aside-title">目录</h3>
                <div class="align-items-stretch group_item">
                    <div class="pos-box">
                        <div class="scroll-box">
                            <div class="toc-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t0">文章目录</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t1">一、网络编程基本概念</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t2">1、网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t3">2、计算机网络</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t4">3、通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t5">4、通信接口</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t6">二、网络分层</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t7">三、网络编程三要素</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t8">1、IP地址：InetAddress</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t9">2、端口</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t10">3、协议</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t11">3.1、网络通信协议</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t12">3.2、TCP/IP协议簇</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t13">3.3、TCP 和 UDP</a></li></ol></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t14">四. TCP通信程序</a></li><li class="sub-box"><ol><li class="active"><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t15">1、TCP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t16">2、TCP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t17">五. UDP通信程序</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t18">1、 UDP通信原理</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t19">2、三个概念：数据包(Packet)、数据报(Datagram)和套接字(Socket)</a></li><li class="sub-box"><ol><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t20">2.1、数据报(Datagram)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t21">2.2、套接字(Socket)</a></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t22">2.3、数据包(Packet)</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t23">3、 UDP发送数据</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t24">六、URL编程</a></li><li class="sub-box"><ol><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t25">1、URL类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t26">2、针对HTTP协议的URLConnection类</a></li><li><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t27">3、URL下载网络资源</a></li></ol></li><li class=""><a href="https://blog.csdn.net/qq_52519008/article/details/127169869#t28">七、小结</a></li></ol></div>
                        </div>
                    </div>
                </div>
                </div>
            </div>
        </div>
    </aside>
</div>

      </div>
      <div class="mask-dark"></div>
      <div class="skin-boxshadow"></div>
      <div class="directory-boxshadow"></div>
<div class="comment-side-box-shadow comment-side-tit-close" id="commentSideBoxshadow">
<div class="comment-side-content">
	<div class="comment-side-tit">
		<span class="comment-side-tit-count">评论</span>	
	<img class="comment-side-tit-close" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/closeBt.png"></div>
	<div id="pcCommentSideBox" class="comment-box comment-box-new2 " style="display:block">
		<div class="comment-edit-box d-flex">
			<div class="user-img">
				<a href="https://blog.csdn.net/u013421039" target="_blank">
					<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/default.jpg!1">
				</a>
			</div>
			<form id="commentform">
				<textarea class="comment-content" name="comment_content" id="comment_content" placeholder="欢迎高质量的评论，低质的评论会被折叠" maxlength="1000"></textarea>
				<div class="comment-reward-box" style="background-image: url(&#39;https://img-home.csdnimg.cn/images/20230131025301.png&#39;);">
          <a class="btn-remove-reward"></a>
          <div class="form-reward-box">
            <div class="info">
              成就一亿技术人!
            </div>
            <div class="price-info">
              拼手气红包<span class="price">6.0元</span>
            </div>
          </div>
        </div>
        <div class="comment-operate-box">
					<div class="comment-operate-l">
						<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
					</div>
					<div class="comment-operate-c">
						&nbsp;
					</div>
					<div class="comment-operate-r">
            <div class="comment-operate-item comment-reward">
							<img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/commentReward.png" alt="红包">
							<span class="comment-operate-tip">添加红包</span>
						</div>
						<div class="comment-operate-item comment-emoticon">
							<img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/commentEmotionIcon.png" alt="表情包">
							<span class="comment-operate-tip">插入表情</span>
							<div class="comment-emoticon-box comment-operate-isshow" style="display: none;">
								<div class="comment-emoticon-img-box"></div>
							</div>
						</div>
						<div class="comment-operate-item comment-code">
							<img class="comment-operate-img" data-url="https://csdnimg.cn/release/blogv2/dist/pc/img/" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/commentCodeIcon.png" alt="表情包">
							<span class="comment-operate-tip">代码片</span>
							<div class="comment-code-box comment-operate-isshow" style="display: none;">
								<ul id="commentCode">
									<li><a data-code="html">HTML/XML</a></li>
									<li><a data-code="objc">objective-c</a></li>
									<li><a data-code="ruby">Ruby</a></li>
									<li><a data-code="php">PHP</a></li>
									<li><a data-code="csharp">C</a></li>
									<li><a data-code="cpp">C++</a></li>
									<li><a data-code="javascript">JavaScript</a></li>
									<li><a data-code="python">Python</a></li>
									<li><a data-code="java">Java</a></li>
									<li><a data-code="css">CSS</a></li>
									<li><a data-code="sql">SQL</a></li>
									<li><a data-code="plain">其它</a></li>
								</ul>
							</div>
						</div>
						<div class="comment-operate-item">
							<input type="hidden" id="comment_replyId" name="comment_replyId">
							<input type="hidden" id="article_id" name="article_id" value="127169869">
							<input type="hidden" id="comment_userId" name="comment_userId" value="">
							<input type="hidden" id="commentId" name="commentId" value="">
							<a data-report-click="{&quot;mod&quot;:&quot;1582594662_003&quot;,&quot;spm&quot;:&quot;1001.2101.3001.4227&quot;,&quot;ab&quot;:&quot;new&quot;}">
							<input type="submit" class="btn-comment btn-comment-input" value="评论">
							</a>
						</div>
					</div>
				</div>
			</form>
		</div>
		<div class="comment-list-container">
			<div class="comment-list-box comment-operate-item">
			</div>
			<div id="lookFlodComment" class="look-flod-comment" style="display: none;">
					<span class="count">0</span>&nbsp;条评论被折叠&nbsp;<a class="look-more-flodcomment">查看</a>
			</div>
			
		</div>
	</div>
	<div id="pcFlodCommentSideBox" class="pc-flodcomment-sidebox">
		<div class="comment-fold-tit"><span id="lookUnFlodComment" class="back"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/commentArrowLeftWhite.png" alt=""></span>被折叠的&nbsp;<span class="count">0</span>&nbsp;条评论
		 <a href="https://blogdev.blog.csdn.net/article/details/122245662" class="tip" target="_blank">为什么被折叠?</a>
		 <a href="https://bbs.csdn.net/forums/FreeZone" class="park" target="_blank">
		 <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconPark.png">到【灌水乐园】发言</a>                                
		</div>
		<div class="comment-fold-content"></div>
		<div id="lookBadComment" class="look-bad-comment side-look-comment">
			<a class="look-more-comment">查看更多评论<img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/commentArrowDownWhite.png" alt=""></a>
		</div>
	</div>
</div>
<div class="comment-rewarddialog-box">
  <div class="form-box">
    <div class="title-box">
      添加红包
      <a class="btn-form-close"></a>
    </div>
    <form id="commentRewardForm">
      <div class="ipt-box">
        <label for="txtName">祝福语</label>
        <div class="ipt-btn-box">
          <input type="text" name="name" id="txtName" autocomplete="off" maxlength="50">
          <a class="btn-ipt btn-random"></a>
        </div>
        <p class="notice">请填写红包祝福语或标题</p>
      </div>
      <div class="ipt-box">
        <label for="txtSendAmount">红包数量</label>
        <div class="ipt-txt-box">
          <input type="text" name="sendAmount" maxlength="4" id="txtSendAmount" placeholder="请填写红包数量(最小10个)" autocomplete="off">
          <span class="after-txt">个</span>
        </div>
        <p class="notice">红包个数最小为10个</p>
      </div>
      <div class="ipt-box">
        <label for="txtMoney">红包总金额</label>
        <div class="ipt-txt-box error">
          <input type="text" name="money" maxlength="5" id="txtMoney" placeholder="请填写总金额(最低5元)" autocomplete="off">
          <span class="after-txt">元</span>
        </div>
        <p class="notice">红包金额最低5元</p>
      </div>
      <div class="balance-info-box">
        <label>余额支付</label>
        <div class="balance-info">
          当前余额<span class="balance">3.43</span>元
          <a href="https://i.csdn.net/#/wallet/balance/recharge" class="link-charge" target="_blank">前往充值 &gt;</a>
        </div>
      </div>
      <div class="opt-box">
        <div class="pay-info">
          需支付：<span class="price">10.00</span>元
        </div>
        <button type="button" class="ml-auto btn-cancel">取消</button>
        <button type="button" class="ml8 btn-submit" disabled="true">确定</button>
      </div>
    </form>
  </div>
</div>

</div>

<div class="redEnvolope" id="redEnvolope">
  <div class="env-box">
    <div class="env-container">
      <div class="pre-open" id="preOpen">
        <div class="top" style="background-image: url(&quot;https://img-home.csdnimg.cn/images/20230131025150.png&quot;);">
          <header>
            <img class="clearTpaErr" :src="redpacketAuthor.avatar" alt="">
            <div class="author">成就一亿技术人!</div>
          </header>
          <div class="bot-icon"></div>
        </div>
        <footer style="background-image: url(&quot;https://img-home.csdnimg.cn/images/20230131025228.png&quot;);">
          <div class="red-openbtn open-start" style="background-image: url(&quot;https://img-home.csdnimg.cn/images/20230131025209.png&quot;);"></div>
          <div class="tip">
            领取后你会自动成为博主和红包主的粉丝
            <a class="rule" target="_blank" href="https://blogdev.blog.csdn.net/article/details/128932621">规则</a>
          </div>
        </footer>
      </div>
      <div class="opened" id="opened">
        <div class="bot-icon">
          <header>
            <a class="creatorUrl" href="https://blog.csdn.net/qq_52519008/article/details/127169869" target="_blank">
              <img class="clearTpaErr" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/1_hope_wisdom" alt="">
            </a>
            <div class="author">
              <div class="tt">hope_wisdom</div> 发出的红包
            </div>
          </header>
        </div>
        <div class="receive-box">
          <header></header>
          <div class="receive-list">
          </div>
        </div>
      </div>
    </div>
    <div class="close-btn"></div>
  </div>
</div>
      <div class="pay-code">
      <div class="pay-money">实付<span class="pay-money-span" data-nowprice="" data-oldprice="">元</span></div>
      <div class="content-blance"><a class="blance-bt" href="javascript:;">使用余额支付</a></div>
      <div class="content-code">
        <div id="payCode" data-id="">
          <div class="renovate">
            <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/pay-time-out.png">
            <span>点击重新获取</span>
          </div>
        </div>
        <div class="pay-style"><span><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/weixin.png"></span><span><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/zhifubao.png"></span><span><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/jingdong.png"></span><span class="text">扫码支付</span></div>
      </div>
      <div class="bt-close">
        <svg t="1567152543821" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10924" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12">
          <defs>
            <style type="text/css"></style>
          </defs>
          <path d="M512 438.378667L806.506667 143.893333a52.032 52.032 0 1 1 73.6 73.621334L585.621333 512l294.485334 294.485333a52.074667 52.074667 0 0 1-73.6 73.642667L512 585.621333 217.514667 880.128a52.053333 52.053333 0 1 1-73.621334-73.642667L438.378667 512 143.893333 217.514667a52.053333 52.053333 0 1 1 73.621334-73.621334L512 438.378667z" fill="" p-id="10925"></path>
        </svg>
      </div>
      <div class="pay-balance">
        <input type="radio" class="pay-code-radio" data-type="details">
        <span class="span">钱包余额</span>
          <span class="balance" style="color:#FC5531;font-size:14px;">0</span>
          <div class="pay-code-tile">
            <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/pay-help.png" alt="">
            <div class="pay-code-content">
              <div class="span">
                <p class="title">抵扣说明：</p>
                <p> 1.余额是钱包充值的虚拟货币，按照1:1的比例进行支付金额的抵扣。<br> 2.余额无法直接购买下载，可以购买VIP、C币套餐、付费专栏及课程。</p>
              </div>
            </div>
          </div>
      </div>
      <a class="pay-balance-con" href="https://i.csdn.net/#/wallet/balance/recharge" target="_blank"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/recharge.png" alt=""><span>余额充值</span></a>
    </div>
    <div style="display:none;">
      <img src="https://blog.csdn.net/qq_52519008/article/details/127169869" onerror="setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href=&quot;\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74&quot;}},3000);">
    </div>
      <div class="keyword-dec-box" id="keywordDecBox"></div>
  
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/axios-83fa28cedf.min.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/pc_wap_highlight-8defd55d6e.min.js.下载" type="text/javascript"></script>
  <ins class="adsbygoogle adsbygoogle-noablate" data-adsbygoogle-status="done" style="display: none !important;" data-ad-status="unfilled"><div id="aswift_0_host" style="border: none; height: 0px; width: 0px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;" tabindex="0" title="Advertisement" aria-label="Advertisement"><iframe id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;border:0;width:undefinedpx;height:undefinedpx;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/ads(1).html" data-google-container-id="a!1" data-load-complete="true"></iframe></div></ins><script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/pc_wap_common-be82269d23.min.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/edit_copy_code-2d3931414f.min.js.下载" type="text/javascript"></script>
  <link rel="stylesheet" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/atom-one-light.css">
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-accusation.js.下载" type="text/javascript"></script>
  <script>
    // 全局声明
    if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
      options: {
        report: {
          isShow: true,
        },
        qr: {
          isShow: false,
        },
        guide: {
          isShow: true
        }
      }
    }
    $(function() {
      $(document).on('click', "a.option-box[data-type='report']", function() {
        window.csdn.loginBox.key({
          biz: 'blog',
          subBiz: 'other_service',
          cb: function() {
            window.csdn.feedback({
              "type": 'blog',
              "rtype": 'article',
              "rid": articleId,
              "reportedName": username,
              "submitOptions": {
                "title": articleTitle,
                "contentUrl": articleDetailUrl
              },
              "callback": function() {
                showToast({
                  text: "感谢您的举报，我们会尽快审核！",
                  bottom: '10%',
                  zindex: 9000,
                  speed: 500,
                  time: 1500
                })
              }
            })
          }
        })
      });
    })
  </script>
    <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/baidu-search.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/qrcode.js.下载"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/qrcode.min.js.下载"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-ordercart.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/user-ordertip.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/order-payment.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/common-346b634517.min.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/detail-434942c04f.min.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/column-3911b0dc26.min.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/side-toolbar.js.下载" type="text/javascript"></script>
  <script src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/copyright.js.下载" type="text/javascript"></script>
  <script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
      $('div.markdown_views')[0].className = 'markdown_views';
    }
  </script>
  <script type="text/javascript" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/MathJax.js.下载"></script>
  <script type="text/x-mathjax-config;executed=true">
    MathJax.Hub.Config({
      "HTML-CSS": {
        linebreaks: { automatic: true, width: "94%container" },
        imageFont: null
      },
      tex2jax: {
      preview: "none",
      ignoreClass:"title-article"
      },
      mml2jax: {
      preview: 'none'
      }
    });
  </script>
<script type="text/javascript" crossorigin="" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/csdn-login-box.js.下载"></script><div id="pointDivs"><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div><div class="point-outer point-pre"><div class="point-inner"></div></div></div><div id="st_mask" onclick="closeMask()" style="width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); position: fixed; left: 0px; top: 0px; display: none; z-index: 1;"></div><div id="st_confirmBox" style="width: 360px; position: fixed; text-align: left; display: none; z-index: 100; inset: 0px; height: 208px; margin: auto;"><div id="st_confirm" style="background: rgb(255, 255, 255); border-radius: 4px; overflow: hidden; padding: 24px; width: 360px; height: 208px;"><span id="st_confirm_tit" style="width: 100%; max-height: 24px; font-size: 18px; font-weight: 500; color: rgb(34, 34, 38); line-height: 24px; text-align: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span><span id="st_confirm_text" style="text-align: left; height: 44px; font-size: 14px; font-weight: 400; color: rgb(85, 86, 102); line-height: 22px; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; text-overflow: ellipsis; -webkit-line-clamp: 2; margin-top: 16px; margin-bottom: 40px;"></span><span class="st_confirm_btn success" style="background: rgb(252, 85, 51); color: rgb(255, 255, 255); text-align: center; display: block; width: 88px; height: 36px; line-height: 36px; margin-left: 16px; float: right; border-radius: 18px;">确定</span><span class="st_confirm_btn cancel" style="color: rgb(34, 34, 38); text-align: center; display: block; width: 88px; height: 36px; line-height: 36px; margin-left: 16px; float: right; box-sizing: border-box; border: 1px solid rgb(204, 204, 216); border-radius: 18px;">取消</span><span id="st_confirm_close" style="display: block; width: 12px; height: 12px; position: absolute; text-align: center; z-index: 100; top: 24px; right: 24px;"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/closeBt.png" style="display: block; width: 12px; height: 12px;"></span><div style="clear: both; display: block;"></div></div></div><div id="st_alertBox" style="width: 100%; position: fixed; left: 0px; top: 34%; text-align: center; display: none; z-index: 2;"><div id="st_alert" style="width: 80%; margin: 0px auto; background: rgb(255, 255, 255); border-radius: 2px; overflow: hidden; padding-top: 20px; text-align: center;"><span id="st_alert_text" style="background: rgb(255, 255, 255); overflow: hidden; padding: 15px 8px 30px; text-align: center; display: block;"></span><span id="st_alert_btn" onclick="closeMask()" style="background: rgb(27, 121, 248); color: rgb(255, 255, 255); padding: 8px; text-align: center; display: block; width: 72%; margin: 0px auto 20px; border-radius: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></span></div></div><div id="st_toastBox" style="width: 100%; position: fixed; left: 0px; bottom: 10%; text-align: center; display: none;"><span id="st_toastContent" style="color: rgb(255, 255, 255); background: rgba(0, 0, 0, 0.8); padding: 8px 24px; border-radius: 4px; max-width: 80%; display: inline-block; font-size: 16px;"></span></div> <div class="report-box">  <div class="pos-boxer">      <div class="pos-content">          <div class="box-title">              <p>举报</p>              <img class="icon btn-close" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/closeBlack.png">          </div>          <div class="box-header">              <div class="box-top"><span>选择你想要举报的内容（必选）</span></div>              <div class="box-botoom">                  <ul>                      <li data="1" type="nei">内容涉黄</li>                      <li data="2" type="nei">政治相关</li>                      <li data="3" type="nei">内容抄袭</li>                      <li data="4" type="nei">涉嫌广告</li>                      <li data="5" type="nei">内容侵权</li>                      <li data="6" type="nei">侮辱谩骂</li>                      <li data="8" type="nei">样式问题</li>                      <li data="7" type="nei">其他</li>                  </ul>              </div>          </div>          <div>          <div class="box-content">          </div>          <div class="box-content">          </div>                    <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>原文链接（必填）</span>                      </div>                      <div class="box-content-bottom" style="padding-bottom: 16px;">                        <div class="box-input" style="height: 32px;line-height: 32px;">                        <input class="content-input" type="text" id="originalurl" name="originalurl" placeholder="请输入被侵权原文链接">                        </div>                      </div>          </div>          <div class="box-content">          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">包含不实信息</li>                              <li sub_type="2">涉及个人隐私</li>                          </ul>                      </div>          </div>          <div class="box-content" style="display:none;">                  <div class="box-content-top">                          <span>请选择具体原因（必选）</span>                      </div>                  <div class="box-content-bottom">                          <ul>                              <li sub_type="1">侮辱谩骂</li>                              <li sub_type="2">诽谤</li>                          </ul>                  </div>          </div>          <div class="box-content" style="display:none;">                <div class="box-content-top">                        <span>请选择具体原因（必选）</span>                    </div>                <div class="box-content-bottom">                        <ul>                            <li sub_type="1">搬家样式</li>                            <li sub_type="2">博文样式</li>                        </ul>                </div>          </div>          <div class="box-content" style="display:none;">          </div>          </div>            <div id="cllcont" style="display:none;">            <div class="box-content-top">              <span class="box-content-span">补充说明（选填）</span>            </div>                <div class="box-content-bottom">                  <div class="box-input">                    <textarea class="ipt ipt-textarea" style="padding:0;" name="description" placeholder="请详细描述您的举报内容"></textarea>                  </div>                </div>            </div>            </div>      <div class="pos-footer">          <p class="btn-close">取消</p>          <p class="box-active">确定</p>      </div>  </div></div><svg aria-hidden="true" style="position: absolute; width: 0px; height: 0px; overflow: hidden;"><symbol id="sousuo" viewBox="0 0 1024 1024"><path d="M719.6779726 653.55865555l0.71080936 0.70145709 191.77828505 191.77828506c18.25658185 18.25658185 18.25658185 47.86273439 0 66.12399318-18.26593493 18.26125798-47.87208744 18.26125798-66.13334544 0l-191.77828505-191.77828506c-0.2338193-0.2338193-0.4676378-0.4676378-0.69678097-0.71081014-58.13206223 44.25257003-130.69075187 70.51978897-209.38952657 70.51978894C253.06424184 790.19776156 98.14049639 635.27869225 98.14049639 444.17380511S253.06424184 98.14049639 444.16912898 98.14049639c191.10488633 0 346.02863258 154.92374545 346.02863259 346.02863259 0 78.6987747-26.27189505 151.25746514-70.51978897 209.38952657z m-275.50884362 43.11621045c139.45428506 0 252.50573702-113.05145197 252.50573702-252.50573702s-113.05145197-252.50573702-252.50573702-252.50573783-252.50573702 113.05145197-252.50573783 252.50573783 113.05145197 252.50573702 252.50573783 252.50573702z"></path></symbol><symbol id="gonggong_csdnlogo_" viewBox="0 0 4096 1024"><path d="M1234.16069807 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3010.8325562 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2141.37671774 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z" fill="#262626"></path><path d="M1109.8678928 870.30336371c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157302-372.90540663C385.78470347 268.40769434 659.36382925 126.08500985 958.9081404 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z" fill="#CA0C16"></path></symbol><symbol id="gonggong_csdnlogodanse_" viewBox="0 0 4096 1024"><path d="M1229.41995733 690.46341551c62.96962316 23.02318413 194.30703694 45.91141406 300.51598128 45.91141406 114.44114969 0 178.13952547-31.68724287 183.2407937-80.86454822 4.642424-44.8587714-42.21366937-50.93170978-171.44579784-81.53931916-178.57137886-43.77913792-292.49970264-111.55313011-281.32549604-219.86735976 12.9825927-125.75031047 181.27046257-220.78504823 439.49180199-220.78504822 125.88526465 0 247.93783044 8.87998544 311.17736197 29.60894839l-21.7006331 158.57116851c-41.05306337-14.27815288-198.1937175-34.11641822-304.48363435-34.11641822-107.7744129 0-163.56447339 33.90049151-167.42416309 71.06687432-4.85835069 47.04502922 51.14763648 49.23128703 191.14910897 86.50563321 189.58364043 48.09767188 272.47250144 115.81768239 261.6221849 220.81203906-12.71268432 123.51007099-164.13128096 228.53141851-466.48263918 228.53141851-125.85827383 0-234.33444849-22.96920244-294.09216204-45.93840492l19.730302-157.86940672zM3006.09181546 172.75216735c688.40130256-129.79893606 747.80813523 103.42888812 726.53935551 309.80082928l-40.08139323 381.78539207h-218.51781789l36.57258439-348.20879061c7.90831529-76.68096846 57.13960232-226.66905073-180.54170997-221.05495659-82.26807176 1.99732195-123.05122675 13.2794919-123.05122677 13.27949188s-7.15257186 92.65954408-15.81663059 161.13529804l-41.43093509 394.84895728h-214.3072473l42.53755943-389.15389062 28.09746151-302.43233073z m-869.48282929-18.05687008c49.12332368-5.34418577 124.58970448-10.76934404 228.45044598-10.76934405 173.38913812 0 313.57954648 30.17575597 400.38207891 93.63121421 77.94953781 59.16391512 129.82592689 154.95439631 115.4668015 293.74128117-13.25250106 129.15115596-80.405704 219.57046055-178.16651631 275.4954752-89.44763445 52.74009587-202.16137055 75.27744492-371.66382812 75.27744493-99.94707012 0-195.27870708-5.39816743-267.77609576-16.14052064L2136.635977 154.69529727z m143.26736381 569.85754561c16.70732823 3.23890047 38.67786969 6.45081009 81.99816339 6.45081009 173.44311979 0 295.7386031-85.23706385 308.01943403-205.07638097 17.84094339-173.2271931-90.63523129-233.79463176-273.39018992-232.74198912-23.67096422 0-56.57279475 0-73.98188473 3.1849188l-42.6725136 428.15565036z m-1174.74919792 145.75052083c-41.10704503 14.25116203-126.26313639 23.96786342-245.23874671 23.96786342-342.13585224 0-526.8071603-160.59548129-504.97157303-372.90540663C381.04396273 268.40769434 654.62308851 126.08500985 954.16739966 126.08500985c116.00661824 0 184.32042718 9.33882968 248.31570215 24.99351522l-20.5400271 170.42014604c-42.56455024-14.33213455-142.32268451-27.50366309-223.07926938-27.50366311-176.25016686 0-325.94134993 52.49717834-343.10752238 218.57179958-15.30380469 148.50358623 89.7715245 219.48948804 288.04621451 219.48948804 69.0155707 0 170.77102691-9.8786464 217.81605614-24.15679928l-16.49140154 162.40386737z"></path></symbol><symbol id="xieboke1" viewBox="0 0 1024 1024"><path d="M204.70021457 751.89799169h657.99199211a33.6932867 33.6932867 0 0 1 0 67.33536736H163.68452703a33.53966977 33.53966977 0 0 1-18.74125054-5.68382181c-18.63883902-9.4218307-18.17798882-29.44322156-15.20806401-39.17228615C199.0675982 570.27171976 309.41567149 409.58853908 435.38145354 290.12586836A243.22661203 243.22661203 0 0 1 536.97336934 234.20935065c138.10150976-33.79569759 228.3257813-29.95527721 318.60125827-28.52152054-17.15387692 20.48224105-36.20236071 41.6301547-57.29906892 62.93168529-3.1747472 3.22595323-164.67721739 19.91897936-187.97576692 47.05794871-23.29854894 27.13896932 129.60138005 7.37360691 125.19769798 11.11161576-21.6599699 18.33160576-44.90731339 36.4071831-69.94685287 53.8682939-4.50609297 3.1747472-149.52035944-0.35843931-174.61110436 27.85584737-25.19315641 28.16308124 101.89914903 18.12678338 96.0617103 21.40394206-67.43777825 37.63611797-125.96578207 64.62147036-212.70807253 93.8086635-57.65750823 19.4069231-121.8181284 133.13456658-146.5504346 179.06599187a435.75967738 435.75967738 0 0 0-23.04252112 49.10617311z" fill="#CA0C16"></path></symbol><symbol id="gitchat" viewBox="0 0 1024 1024"><path d="M892.08971773 729.08552746h-108.597062v-162.89559374H403.40293801v-108.59706198h488.68677972v271.49265572z m-651.58237345 54.298531V783.49265572h488.68678045v108.59706201H131.91028227V131.91028227h760.17943546v217.19412473h-108.597062V240.50734428H240.50734428v542.87671418z m542.98531145 0h108.597062v108.59706199h-108.597062v-108.59706199z" fill="#FF9100"></path></symbol><symbol id="toolbar-memberhead" viewBox="0 0 1303 1024"><path d="M1061.51168438 433.79527648A78.51879902 78.51879902 0 1 1 1129.35192643 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H319.35199503c-41.30088817 0-76.00619753-28.81639958-80.717325-66.97653526L189.01078861 472.74060007H187.12633728a78.51879902 78.51879902 0 1 1 67.76172401-38.86680556l193.31328323 119.81968805 158.13686148-336.06046024A78.5973179 78.5973179 0 0 1 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607z" fill="#FDD840"></path><path d="M1050.8331274 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643684 67.133573-80.79584389 67.13357302H659.02432018C658.47468805 793.25433807 658.23913228 505.32590231 658.23913228 80.14660493a78.51879902 78.51879902 0 0 1 51.58685077 137.721974l158.13686147 335.82490362 193.54883986-119.89820607A78.51879902 78.51879902 0 0 1 1050.8331274 394.22180104z" fill="#FFBE00"></path></symbol><symbol id="toolbar-m-memberhead" viewBox="0 0 1303 1024"><path d="M1062.74839935 433.79527648A78.51879902 78.51879902 0 1 1 1130.58864141 472.74060007h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H320.58871c-41.30088817 0-76.00619753-28.81639958-80.71732499-66.97653526L190.24750358 472.74060007H188.36305226a78.51879902 78.51879902 0 1 1 67.761724-38.86680556l193.31328324 119.81968805 158.13686147-336.06046024A78.5973179 78.5973179 0 0 1 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607z" fill="#D6D6D6"></path><path d="M1052.06984238 394.22180104a78.51879902 78.51879902 0 1 1 78.51879903 78.51879903h-1.80593246l-48.05350474 403.97922198c-4.55409058 38.16013652-39.41643685 67.133573-80.79584389 67.13357302H660.26103515C659.71140302 793.25433807 659.47584726 505.32590231 659.47584726 80.14660493a78.51879902 78.51879902 0 0 1 51.58685076 137.721974l158.13686148 335.82490362 193.54883985-119.89820607A78.51879902 78.51879902 0 0 1 1052.06984238 394.22180104z" fill="#C1C1C1"></path></symbol><symbol id="csdnc-upload" viewBox="0 0 1024 1024"><path d="M216.37466416 723.16095396v84.46438188h591.25067168v-84.46438188c0-23.32483876 18.90735218-42.23219094 42.23219093-42.23219021s42.23219094 18.90735218 42.23219096 42.23219021v84.46438188c0 46.64967827-37.81470362 84.46438188-84.46438189 84.46438189H216.37466416c-46.64967827 0-84.46438188-37.81470362-84.46438189-84.4643819v-84.46438187c0-23.32483876 18.90735218-42.23219094 42.23219096-42.23219021s42.23219094 18.90735218 42.23219094 42.23219021zM469.76780906 275.55040991L246.55378774 499.53305726a42.30820888 42.30820888 0 0 1-59.99082735 0c-16.56346508-16.62259056-16.56346508-43.57095155 0-60.19354139L480.51167818 144.38144832A42.21952103 42.21952103 0 0 1 512 131.93984464a42.20262858 42.20262858 0 0 1 31.48409853 12.44160369l293.95294108 294.95806754c16.56346508 16.62259056 16.56346508 43.57095155 0 60.19354139a42.30820888 42.30820888 0 0 1-59.99082735 0L554.23219094 275.55040991V680.92876375c0 23.32483876-18.90735218 42.23219094-42.23219094 42.23219021s-42.23219094-18.90735218-42.23219094-42.23219021V275.55040991z"></path></symbol></svg><div>
  <div class="csdn-side-toolbar " style="left: 1670.33px;"><a class="option-box directory directory-show" data-type="show" style="display:flex" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7790&quot;}">        <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconShowDirectory.png" alt="" srcset=""><img style="display:block" class="icon-option-beta" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconSideBeta.png" alt="" srcset="">        <span class="show-txt">只看<br>目录</span>      </a><a class="option-box directory directory-hide" data-type="hide" style="display: none;" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7791&quot;}">        <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconHideDirectory.png" alt="" srcset=""><img style="display:block" class="icon-option-beta" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconSideBeta.png" alt="" srcset="">        <span class="show-txt">隐藏<br>目录</span>      </a><a class="option-box sidecolumn sidecolumn-show" data-type="show" style="display: none;" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7788&quot;}">        <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconShowSide.png" alt="" srcset=""><img style="display:block" class="icon-option-beta" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconSideBeta.png" alt="" srcset="">        <span class="show-txt">显示<br>侧栏</span>      </a><a class="option-box sidecolumn sidecolumn-hide" data-type="hide" style="display:flex" data-report-click="{&quot;spm&quot;:&quot;1001.2101.3001.7789&quot;}">        <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconHideSide.png" alt="" srcset=""><img style="display:block" class="icon-option-beta" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/iconSideBeta.png" alt="" srcset="">        <span class="show-txt">隐藏<br>侧栏</span>      </a>
    
    <a class="option-box" data-type="guide">
      <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/guide.png" alt="" srcset="">
      <span class="show-txt">新手<br>引导</span>
    </a>
    
    
    
    
    
    <a class="option-box" data-type="cs">
      <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/kefu.png" alt="" srcset="">
      <span class="show-txt">客服</span>
    </a>
    
    
    
    <a class="option-box" data-type="report">
      <span class="show-txt" style="display:flex;opacity:100;">举报</span>
    </a>
    
    
    <a class="option-box" data-type="gotop">
      <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/fanhuidingbucopy.png" alt="" srcset="">
      <span class="show-txt">返回<br>顶部</span>
    </a>
    
  </div>
  </div><iframe name="googlefcPresent" style="display: none; width: 0px; height: 0px; border: none; z-index: -1000; left: -1000px; top: -1000px;" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/saved_resource(3).html"></iframe><div class="imgViewDom">        <div class="swiper swiper-container-initialized swiper-container-horizontal">          <a class="close-btn">            <img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/quoteClose1White.png">          </a>          <div class="swiper-wrapper" style="transition: all 0ms ease 0s;"><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/b9fe5e305a524896a4124178f8161ec7.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/b9fe5e305a524896a4124178f8161ec7.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/79a8101b2a6c46999cee58491f4ce440.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/79a8101b2a6c46999cee58491f4ce440.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/9d06e92e2228471aaf0c06a58a5ead62.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/9d06e92e2228471aaf0c06a58a5ead62.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/868b4df014c045f8a546880cdec5d831.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/868b4df014c045f8a546880cdec5d831.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/de3e34e28d73425dbe229346aaa754f8.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/de3e34e28d73425dbe229346aaa754f8.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/112924ac446d43248a51e096cea87a5e.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/112924ac446d43248a51e096cea87a5e.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d2bf0bb5156a4dfd9b4cb279ea8ccbf0.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d2bf0bb5156a4dfd9b4cb279ea8ccbf0.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/33e6cc0f361d44c983c10f80b3ecc4e9.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/33e6cc0f361d44c983c10f80b3ecc4e9.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/858b9e4f9686473e843b64882587e2eb.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/858b9e4f9686473e843b64882587e2eb.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/5b14284407c64ebe91080fd81587f8a6.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/5b14284407c64ebe91080fd81587f8a6.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bc80b58888af491a973643530c00f4d9.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/bc80b58888af491a973643530c00f4d9.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/6a4a301fe7a94f968d8c7e7a2853cb86.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/6a4a301fe7a94f968d8c7e7a2853cb86.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/8988a8236c0d4f03bb034669c619c571.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/8988a8236c0d4f03bb034669c619c571.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d9e059f6d1fd4fffbdee050e4ee42486.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/d9e059f6d1fd4fffbdee050e4ee42486.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/49b47edbb33e453e8550625e22cf96fb.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/49b47edbb33e453e8550625e22cf96fb.png"></a></div><div class="swiper-slide"><a target="_blank" href="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/05ce2b81536947faa04e3174805f087f.png"><img src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/05ce2b81536947faa04e3174805f087f.png"></a></div></div>          <div class="swiper-button-prev" tabindex="0" role="button" aria-label="Previous slide" aria-disabled="false"></div>          <div class="swiper-button-next" tabindex="0" role="button" aria-label="Next slide" aria-disabled="false"></div>        <span class="swiper-notification" aria-live="assertive" aria-atomic="true"></span></div>      </div><iframe src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/aframe.html" width="0" height="0" style="display: none;"></iframe><div class="notification" style="position: fixed; left:initial; right: 24px; top: 50px; bottom: initial; z-index: 99999;"></div></body><iframe id="google_esf" name="google_esf" src="./(527条消息) Java基础——网络编程全网超详解！！！！！！！_酱紫学Java的博客-CSDN博客_files/zrt_lookup.html" style="display: none;"></iframe><div style="all: initial;"><div id="__hcfy__" style="all: initial;"><template shadowrootmode="open"><style>#root{-webkit-text-size-adjust:100%;box-sizing:border-box;font-size:14px;font-weight:400;letter-spacing:0;line-height:1.28581;text-transform:none;color:#182026;font-family:-apple-system,"BlinkMacSystemFont","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Open Sans","Helvetica Neue","Icons16",sans-serif}#root{touch-action:manipulation}#root>.bp4-portal{z-index:9999999999}</style><link rel="stylesheet" href="chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/normalize.css"><link rel="stylesheet" href="chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/blueprint.css"><link rel="stylesheet" href="chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/blueprint-select.css"><link rel="stylesheet" href="chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/cropper.css"><style>#translate-panel{background-color:#f6f7f9;display:flex;flex-direction:column;padding-bottom:8px}.bp4-dark #translate-panel{background-color:#252a31}#translate-panel .fixed{flex-shrink:0;margin-bottom:10px}#translate-panel .body{flex-grow:1;overflow:auto;overscroll-behavior:contain}#translate-panel .body::-webkit-scrollbar{width:8px;background-color:rgba(0,0,0,0);-webkit-border-radius:100px}#translate-panel .body::-webkit-scrollbar:hover{background-color:rgba(0,0,0,.09)}#translate-panel .body::-webkit-scrollbar-thumb:vertical{background:rgba(0,0,0,.5);-webkit-border-radius:100px}#translate-panel .body::-webkit-scrollbar-thumb:vertical:active{background:rgba(0,0,0,.61);-webkit-border-radius:100px}#translate-panel.size-small,#translate-panel.size-small h6.bp4-heading,#translate-panel.size-small .bp4-control.bp4-large,#translate-panel.size-small textarea.bp4-input.bp4-small{font-size:14px}#translate-panel.size-small .phonetic-item,#translate-panel.size-small .quick-settings a{font-size:12px}#translate-panel.size-middle,#translate-panel.size-middle h6.bp4-heading,#translate-panel.size-middle .bp4-control.bp4-large,#translate-panel.size-middle textarea.bp4-input{font-size:18px}#translate-panel.size-middle .phonetic-item,#translate-panel.size-middle .quick-settings a{font-size:14px}#translate-panel.size-large,#translate-panel.size-large h6.bp4-heading,#translate-panel.size-large .bp4-control.bp4-large,#translate-panel.size-large textarea.bp4-input.bp4-large{font-size:22px}#translate-panel.size-large .source,#translate-panel.size-large .phonetic-item,#translate-panel.size-large .quick-settings a{font-size:18px}#translate-panel .bp4-button.bp4-small,#translate-panel .bp4-small .bp4-button{min-height:20px;min-width:20px}#translate-panel .header{display:flex;align-items:center;padding:4px 6px 4px 10px;border-bottom:1px solid #d1d1d1}.bp4-dark #translate-panel .header{border-bottom-color:rgba(17,20,24,.4)}#translate-panel .header .drag-block{min-width:5px;flex-shrink:0;flex-grow:1;align-self:stretch}#translate-panel .header .left{flex-shrink:0;display:flex}#translate-panel .header .right{flex-shrink:0;display:flex;align-items:center}#translate-panel .header .right .bp4-icon-arrow-right{flex-shrink:0;margin:0 5px}#translate-panel .header .right>.bp4-button{flex-shrink:0;margin:0 1px}#translate-panel .header .right>.bp4-button:last-child{margin-right:0}#translate-panel .quick-settings{padding:4px 9px;margin:0 1px}#translate-panel .quick-settings>div{margin-bottom:5px}#translate-panel .quick-settings .bp4-control{margin-bottom:0}#translate-panel .query-text{position:relative;padding:10px 10px 2px 10px}#translate-panel .query-text textarea.bp4-input{min-height:44px;font-family:system-ui,-apple-system,"Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";overscroll-behavior:contain}#translate-panel .query-text .translate-btn{position:absolute;opacity:.6}#translate-panel .query-text .translate-btn:hover{opacity:1}#translate-panel .body{padding:0 10px}#translate-panel .body .bp4-card:first-child{margin-top:1px}#translate-panel .body .bp4-card:last-child{margin-bottom:1px}#translate-panel .body .no-api{margin:20px 0}.result-block{margin:8px 0;padding:2px 5px}.result-block .bp4-button{visibility:hidden}.result-block .error .bp4-button,.result-block:hover .bp4-button{visibility:visible}.result-block .legend{display:flex;align-items:center;justify-content:space-between}.result-block .legend .legend-left{display:flex;align-items:center}.result-block .legend .api-ico,.result-block .legend .bp4-heading{flex-shrink:0;white-space:nowrap}.result-block .legend .api-ico{display:inline-block;width:14px;height:14px;background-size:contain;margin-right:3px}.result-block .legend .bp4-heading{margin-bottom:0;margin-right:10px}.result-block .legend .source{cursor:pointer;font-size:12px;display:inline-flex;align-items:center}.result-block .legend .source .source-text{overflow:hidden}.result-block .legend .source .bp4-icon{position:relative;top:-1px;margin-left:1px}.result-block .phonetic{display:flex;flex-wrap:wrap}.result-block .phonetic .phonetic-item{display:flex;align-items:center;font-size:12px}.result-block .phonetic .phonetic-item:not(:last-child){margin-right:12px}.result-block .common-result p{line-height:1.3;margin:2px 0;overflow-wrap:break-word}.result-block .common-result .dict a{text-decoration:underline}.result-block .error{font-size:12px;padding:5px 10px}.result-block .dict-pos{margin-right:5px}.external-translators{margin-bottom:3px;padding:0;display:flex;flex-wrap:wrap}.external-translators>div{margin:0 5px 5px 0}.quick-links a{margin:0 5px 5px 0}#popper-container{width:250px;max-width:100%;position:absolute;left:0;top:0;z-index:9999999998;touch-action:none;transition:opacity .2s;background-color:#f6f7f9}.bp4-dark #popper-container{background-color:#252a31}#popper-container.show{opacity:1;pointer-events:auto;user-select:auto}#popper-container,#popper-container[data-popper-reference-hidden=true]{opacity:0;pointer-events:none;user-select:none}#popper-container .drag-block{cursor:grab}#popper-container.pin{position:fixed}#popper-container.pin .arrow{display:none}#popper-container .arrow,#popper-container .arrow::before{position:absolute;width:8px;height:8px;z-index:-1}#popper-container .arrow::before{content:"";transform:rotate(45deg);background:#f6f7f9}.bp4-dark #popper-container .arrow::before{background-color:#252a31}#popper-container .arrow{display:none}#popper-container.show[data-popper-placement]:not([data-popper-reference-hidden=true]) .arrow{display:block}#popper-container[data-popper-placement^=top] .arrow{bottom:-5px}#popper-container[data-popper-placement^=top] .arrow::before{border-right:1px solid #d1d1d1;border-bottom:1px solid #d1d1d1}#popper-container[data-popper-placement^=bottom] .arrow{top:-5px}#popper-container[data-popper-placement^=bottom] .arrow::before{border-left:1px solid #d1d1d1;border-top:1px solid #d1d1d1}#popper-container[data-popper-placement^=left] .arrow{right:-5px}#popper-container[data-popper-placement^=left] .arrow::before{border-right:1px solid #d1d1d1;border-top:1px solid #d1d1d1}#popper-container[data-popper-placement^=right] .arrow{left:-5px}#popper-container[data-popper-placement^=right] .arrow::before{border-left:1px solid #d1d1d1;border-bottom:1px solid #d1d1d1}#translate-btn{display:none;position:absolute;z-index:9999999999;left:0;top:0}#translate-btn .bp4-button{padding:2px;min-width:0;min-height:0}#translate-btn .btn-icon{width:18px;height:18px;background-image:url(chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/logo.png);background-size:contain}.bp4-dark #translate-btn .btn-icon{background-image:url(chrome-extension://cjlbgpmmejcpkmjoflojmlhhkllmdapj/logowhite36.png)}#translate-btn.show{display:block}.translate-type-selector .bp4-label{display:inline}.translate-type-selector .bp4-radio{margin-bottom:0}#ocr-container{position:fixed;z-index:99999999999999;left:0;top:0;right:0;bottom:0}#ocr-container .toolbar{display:none;position:absolute;z-index:1}#ocr-container img{max-width:100%}#app{cursor:default}.switch-pin{flex-shrink:0;cursor:pointer}.switch-pin .bp4-icon-pin{transition:transform .2s,color .2s;transform:rotate(-45deg)}.pin .switch-pin .bp4-icon-pin{transform:rotate(-70deg)}.cut-btn{margin-left:2px}.app-toaster-container{position:fixed !important;z-index:9999999999 !important}.app-toaster-container .bp4-toast{min-width:auto}#web-trs-panel .app-toaster-container{padding-right:0}</style><div id="root" dir="ltr"><div id="app"><div id="translate-btn"><button type="button" class="bp4-button"><span class="btn-icon"></span></button></div><div id="popper-container" class="bp4-elevation-4" style="width: 250px; transform: translate(0px, 0px);"><div id="translate-panel" class="size-small"><div class="fixed"><div class="header"><div class="left"><div class="switch-pin"><button type="button" class="bp4-button bp4-minimal bp4-small"><span icon="pin" aria-hidden="true" class="bp4-icon bp4-icon-pin"><svg data-icon="pin" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M9.41.92c-.51.51-.41 1.5.15 2.56L4.34 7.54C2.8 6.48 1.45 6.05.92 6.58l3.54 3.54-3.54 4.95 4.95-3.54 3.54 3.54c.53-.53.1-1.88-.96-3.42l4.06-5.22c1.06.56 2.04.66 2.55.15L9.41.92z" fill-rule="evenodd"></path></svg></span></button></div><button type="button" title="图片翻译" class="bp4-button bp4-minimal bp4-small"><span icon="media" aria-hidden="true" class="bp4-icon bp4-icon-media"><svg data-icon="media" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M11.99 6.99c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm3-5h-14c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-10c0-.55-.45-1-1-1zm-1 9l-5-3-1 2-3-4-3 5v-7h12v7z" fill-rule="evenodd"></path></svg></span></button><button type="button" title="语音翻译" class="bp4-button bp4-minimal bp4-small"><span class="bp4-icon"><svg version="1.1" id="Capa_1" width="14" height="14" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 490.9 490.9" xml:space="preserve"><g><g><path d="M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5 C149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5 c0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z"></path><path d="M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3 s5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8 c0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9 C106.6,220,101.2,214.5,94.4,214.5z"></path></g></g></svg></span></button></div><div class="drag-block" title="按住不放可以拖动"></div><div class="right"><div style="font-size: 0px; position: relative;"><button type="button" title="你有 2 条未读消息" class="bp4-button bp4-minimal bp4-small"><span icon="notifications" aria-hidden="true" class="bp4-icon bp4-icon-notifications"><svg data-icon="notifications" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M8 16c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2zm6-5c-.55 0-1-.45-1-1V6c0-2.43-1.73-4.45-4.02-4.9 0-.04.02-.06.02-.1 0-.55-.45-1-1-1S7 .45 7 1c0 .04.02.06.02.1A4.992 4.992 0 003 6v4c0 .55-.45 1-1 1s-1 .45-1 1 .45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1z" fill-rule="evenodd"></path></svg></span></button><div style="position: absolute; background: rgb(243, 1, 1); width: 6px; height: 6px; border-radius: 3px; right: 3px; top: 1px;"></div></div><button type="button" disabled="" title="添加到收藏夹" class="bp4-button bp4-disabled bp4-minimal bp4-small" tabindex="-1"><span icon="star-empty" aria-hidden="true" class="bp4-icon bp4-icon-star-empty"><svg data-icon="star-empty" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M16 6.11l-5.53-.84L8 0 5.53 5.27 0 6.11l4 4.1L3.06 16 8 13.27 12.94 16 12 10.21l4-4.1zM4.91 13.2l.59-3.62L3 7.02l3.45-.53L8 3.2l1.55 3.29 3.45.53-2.5 2.56.59 3.62L8 11.49 4.91 13.2z" fill-rule="evenodd"></path></svg></span></button><button type="button" class="bp4-button bp4-minimal bp4-small settings" title="快捷设置"><span icon="cog" aria-hidden="true" class="bp4-icon bp4-icon-cog"><svg data-icon="cog" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M15.19 6.39h-1.85c-.11-.37-.27-.71-.45-1.04l1.36-1.36c.31-.31.31-.82 0-1.13l-1.13-1.13a.803.803 0 00-1.13 0l-1.36 1.36c-.33-.17-.67-.33-1.04-.44V.79c0-.44-.36-.8-.8-.8h-1.6c-.44 0-.8.36-.8.8v1.86c-.39.12-.75.28-1.1.47l-1.3-1.3c-.3-.3-.79-.3-1.09 0L1.82 2.91c-.3.3-.3.79 0 1.09l1.3 1.3c-.2.34-.36.7-.48 1.09H.79c-.44 0-.8.36-.8.8v1.6c0 .44.36.8.8.8h1.85c.11.37.27.71.45 1.04l-1.36 1.36c-.31.31-.31.82 0 1.13l1.13 1.13c.31.31.82.31 1.13 0l1.36-1.36c.33.18.67.33 1.04.44v1.86c0 .44.36.8.8.8h1.6c.44 0 .8-.36.8-.8v-1.86c.39-.12.75-.28 1.1-.47l1.3 1.3c.3.3.79.3 1.09 0l1.09-1.09c.3-.3.3-.79 0-1.09l-1.3-1.3c.19-.35.36-.71.48-1.1h1.85c.44 0 .8-.36.8-.8v-1.6a.816.816 0 00-.81-.79zm-7.2 4.6c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z" fill-rule="evenodd"></path></svg></span></button><button type="button" title="关闭(Esc)" class="bp4-button bp4-minimal bp4-small"><span icon="cross" aria-hidden="true" class="bp4-icon bp4-icon-cross"><svg data-icon="cross" width="18" height="18" viewBox="0 0 16 16" role="img"><path d="M9.41 8l3.29-3.29c.19-.18.3-.43.3-.71a1.003 1.003 0 00-1.71-.71L8 6.59l-3.29-3.3a1.003 1.003 0 00-1.42 1.42L6.59 8 3.3 11.29c-.19.18-.3.43-.3.71a1.003 1.003 0 001.71.71L8 9.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71L9.41 8z" fill-rule="evenodd"></path></svg></span></button></div></div><div class="bp4-collapse"><div class="bp4-collapse-body" aria-hidden="true"><div class="bp4-card bp4-elevation-0 quick-settings"><div><span class="bp4-popover-wrapper lang-select"><span aria-haspopup="true" class="bp4-popover-target"><div class=""><button type="button" class="bp4-button bp4-small"><span class="bp4-button-text">自动检测</span><span icon="caret-down" aria-hidden="true" class="bp4-icon bp4-icon-caret-down"><svg data-icon="caret-down" width="16" height="16" viewBox="0 0 16 16" role="img"><path d="M12 6.5c0-.28-.22-.5-.5-.5h-7a.495.495 0 00-.37.83l3.5 4c.09.1.22.17.37.17s.28-.07.37-.17l3.5-4c.08-.09.13-.2.13-.33z" fill-rule="evenodd"></path></svg></span></button></div></span></span><span icon="arrow-right" aria-hidden="true" class="bp4-icon bp4-icon-arrow-right" style="margin: 0px 10px;"><svg data-icon="arrow-right" width="12" height="12" viewBox="0 0 16 16" role="img"><path d="M14.7 7.29l-5-5a.965.965 0 00-.71-.3 1.003 1.003 0 00-.71 1.71l3.29 3.29H1.99c-.55 0-1 .45-1 1s.45 1 1 1h9.59l-3.29 3.29a1.003 1.003 0 001.42 1.42l5-5c.18-.18.29-.43.29-.71s-.12-.52-.3-.7z" fill-rule="evenodd"></path></svg></span><span class="bp4-popover-wrapper lang-select"><span aria-haspopup="true" class="bp4-popover-target"><div class=""><button type="button" class="bp4-button bp4-small"><span class="bp4-button-text">中文(简体)</span><span icon="caret-down" aria-hidden="true" class="bp4-icon bp4-icon-caret-down"><svg data-icon="caret-down" width="16" height="16" viewBox="0 0 16 16" role="img"><path d="M12 6.5c0-.28-.22-.5-.5-.5h-7a.495.495 0 00-.37.83l3.5 4c.09.1.22.17.37.17s.28-.07.37-.17l3.5-4c.08-.09.13-.2.13-.33z" fill-rule="evenodd"></path></svg></span></button></div></span></span></div><div><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>谷歌</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>DeepL</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox" checked=""><span class="bp4-control-indicator"></span>百度</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>百度(专业版)</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>腾讯</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>彩云</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox" checked=""><span class="bp4-control-indicator"></span>阿里</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>阿里(专业版)</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox" checked=""><span class="bp4-control-indicator"></span>有道</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>火山</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>必应词典</label><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>搜狗</label></div><div><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>自动朗读</label><span class="bp4-popover-wrapper"><span aria-haspopup="true" class="bp4-popover-target"><label class="bp4-control bp4-checkbox bp4-disabled bp4-inline"><input disabled="" tabindex="0" type="checkbox"><span class="bp4-control-indicator"></span>自动复制</label></span></span></div><div><label class="bp4-control bp4-radio bp4-inline"><input name="Blueprint4.RadioGroup-0" type="radio" value="small" checked=""><span class="bp4-control-indicator"></span>小</label><label class="bp4-control bp4-radio bp4-inline"><input name="Blueprint4.RadioGroup-0" type="radio" value="middle"><span class="bp4-control-indicator"></span>中</label><label class="bp4-control bp4-radio bp4-inline"><input name="Blueprint4.RadioGroup-0" type="radio" value="large"><span class="bp4-control-indicator"></span>大</label></div><div><label class="bp4-control bp4-checkbox bp4-inline"><input type="checkbox"><span class="bp4-control-indicator"></span>显示文本框</label><label class="bp4-control bp4-checkbox bp4-inline" style="margin-right: 0px;"><input type="checkbox"><span class="bp4-control-indicator"></span>鼠标悬浮取词</label></div><a class="bp4-text-small">打开完整设置</a><a class="bp4-text-small" style="margin-left: 15px;"><span icon="crown" aria-hidden="true" class="bp4-icon bp4-icon-crown" style="position: relative; top: -1px;"><svg data-icon="crown" width="14" height="14" viewBox="0 0 16 16" role="img"><path d="M2 6l3 2 3-4 3 4 3-2-1 6H3L2 6zm6-5a1 1 0 110 2 1 1 0 010-2zM1 3a1 1 0 110 2 1 1 0 010-2zm14 0a1 1 0 110 2 1 1 0 010-2zM3 13h10v2H3v-2z" fill-rule="evenodd"></path></svg></span> 开通会员</a></div></div></div></div><div class="body"><p>请输入需要翻译的文本。</p></div></div><div class="arrow"></div></div><div id="web-trs-panel"></div></div></div></template></div></div></html>